水题 #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n,m; cin >> n >> m; int cnt = 0, sum = 0; for(int i = 0 ; i < n; ++ i){ int a; cin >> a; if(sum + a > m){ cnt++; s…
题目地址:http://codeforces.com/contest/435/problem/C /* 题意:给一组公式,一组数据,计算得到一系列的坐标点,画出折线图:) 模拟题:蛮恶心的,不过也简单,依据公式得知折线一定是一上一下的,只要把两个相邻的坐标之间的折线填充就好 注意:坐标有可能为负数,所以移动值y初始化为1000,最后要倒过来输出 详细解释:http://blog.csdn.net/zhb1997/article/details/27877783 */ #include <cstd…
题目传送门 /* 比C还水... */ #include <cstdio> #include <algorithm> #include <cstring> #include <cmath> #include <iostream> using namespace std; typedef long long ll; ; const int INF = 0x3f3f3f3f; ll a[MAXN]; int main(void) //Codeforc…
链接:http://codeforces.com/contest/435/problem/A   A. Queue on Bus Stop time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output It's that time of the year when the Russians flood their countryside su…
C. Woodcutters Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/545/problem/D Description Little girl Susie went shopping with her mom and she wondered how to improve service quality. There are n people in the queue. For ea…
C. Cardiogram time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In this problem, your task is to use ASCII graphics to paint a cardiogram. A cardiogram is a polyline with the following corner…
http://codeforces.com/contest/435/problem/C…
B. Pasha Maximizes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Pasha has a positive integer a without leading zeroes. Today he decided that the number is too small and he should make it…
题目链接: http://codeforces.com/contest/435/problem/D D. Special Grid time limit per test:4 secondsmemory limit per test:256 megabytes 问题描述 You are given an n × m grid, some of its nodes are black, the others are white. Moreover, it's not an ordinary gri…
C好像就是个模拟.D 是个编码复杂度大的,可是好像也就是枚举三角形,我这会儿准备区域赛,尽量找点思维难度大的,所以昨晚A B 还是去做区域赛题吧..... B 也有点意思 贪心 题意:交换相邻两个位的数.然后最多换k次,求最大数 解法,找<=k范围内的最大数.与之交换.右移一位.继续找,直到k用完 //#pragma comment(linker, "/STACK:102400000,102400000") #include <cstdio> #include <…