E. Ciel the Commander Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://www.codeforces.com/contest/322/problem/E Description Now Fox Ciel becomes a commander of Tree Land. Tree Land, like its name said, has n cities connected by n - 1 undirected ro…
#include <cstdio> #include <iostream> #include <vector> using namespace std; int main(){ int n,m; cin >> n >> m; cout<<n+m-1<<endl; for(int i = 1; i <= m ; i ++) cout<<1<<" "<<i<&…
A. Ciel and Dancing 模拟. B. Ciel and Flowers 混合类型的数量只能为0.1.2,否则3个可以分成各种类型各自合成. C. Ciel and Robot 考虑一组命令得到的点集,那么后面的点的起始点会对应于其中点集中的一个点. D. Ciel and Duel 两种策略: atk-atk:一个取最小的前若干个,一个取最大的若干个. atk-def.atk:对于def状态的,需要优先取最靠近的值抵消,剩余atk状态的也是取最近的. E. Ciel the Co…
http://codeforces.com/contest/322/problem/E E. Ciel the Commander time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Now Fox Ciel becomes a commander of Tree Land. Tree Land, like its name sai…
一道贪心题. 可以分两种情况 1 .是没有把对面的牌全打败,那么只要用最大的可能去打攻击状态的牌. 2. 是将对面的牌全打败,那么只要保证打对面防守状态的花费最小,就可以保证最后的结果最大 两种情况下的最大值就我们要的答案. D. Ciel and Duel time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Fox Ciel i…
后天考试,今天做题,我真佩服自己... 这次又只A俩水题... orz各路神犇... 话说这次模拟题挺多... 半个多小时把前面俩水题做完,然后卡C,和往常一样,题目看懂做不出来... A: 算是模拟吧,反正看懂题目后很可耻的生硬水果,没被hack我觉得非常开心... 由于要求两个人至少一个没跳过,画图后发现很偷懒的方法. 虽然跟样例不同,但过了... #include <cstdio> int main() { int n, m; scanf("%d%d", &n…
E. Devu and Flowers 题目连接: http://codeforces.com/contest/451/problem/E Description Devu wants to decorate his garden with flowers. He has purchased n boxes, where the i-th box contains fi flowers. All flowers in a single box are of the same color (hen…