AIM Tech Round 3 (Div. 2) A B C D】的更多相关文章

2017-08-25 15:32:14 writer:pprp 题目: B. Rectangles time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given n × m table. Each cell of the table is colored white or black. Find the numbe…
#include <iostream> using namespace std; ]; int main() { int n, b, d; cin >> n >> b >> d; ; i <= n; i++) { cin >> a[i]; } , tmp = ; ; i <= n; i++) { if (a[i] > b) { continue; } tmp += a[i]; if (tmp > d) { tmp = ;…
虽然打的时候是深夜但是状态比较好 但还是犯了好多错误..加分场愣是打成了降分场 ABC都比较水 一会敲完去看D 很快的就想出了求0和1个数的办法 然后一直wa在第四组..快结束的时候B因为低级错误被hack了...做完B想出了D的正解企图绝杀..然而还是失败了.. 想了想还是由于自己不够认真吧..手速做完前三题 看着能涨分的名次就不太努力的做D了..中间还水了一下群..浪费了很多时间 导致最后没有能够完成D A n个数 大于b被抛弃 不然就加入容器 如果容器中的和大于d 清理容器 直接模拟就好…
Description Vasya takes part in the orienteering competition. There are n checkpoints located along the line at coordinates x1, x2, ..., xn. Vasya starts at the point with coordinate a. His goal is to visit at least n - 1 checkpoint in order to finis…
Description Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the ora…
rating又掉下去了.好不容易蓝了.... A..没读懂题,wa了好几次,明天问队友补上... B. Checkpoints 题意:一条直线上n个点x1,x2...xn,现在在位置a,求要经过任意n-1个点的最小路程 题解:分类讨论,乱搞搞总会出来的,我大概写的很笨…… #include <bits/stdc++.h> using namespace std; typedef long long ll; ]; ll cal(ll x, ll a, ll z) { +(z-a) , (z-a)…
http://codeforces.com/contest/709 题目大意:给一个一维的坐标轴,上面有n个点,我们刚开始在位置a,问,从a点开始走,走n-1个点所需要的最小路程. 思路:我们知道,如果你一会儿走左一会儿左右,最后访问n-1个点一定只会让距离更长的,所以我们的策略是刚开始全都往一端走,然后访问完n-1个点即可.刚开始我是分类讨论的...讨论的要死了...不过后来看了一下别人的代码,发现虽然思路是对的,但是过程想麻烦了. 具体看代码吧. 我的乱七八糟的分类讨论 //看看会不会爆in…
D. Recover the String time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output For each string s consisting of characters '0' and '1' one can define four integers a00, a01, a10 and a11, where axy is…
A. Diversity time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Calculate the minimum number of characters you need to change in the string s, so that it contains at least k different letters,…
A. Diversity time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Calculate the minimum number of characters you need to change in the string s, so that it contains at least k different letters,…