BestCoder Round #72】的更多相关文章

后面的题目补不懂了 暴力 1001 Clarke and chemistry 这题也把我搞死了..枚举系数判断就行了 #include <cstdio> #include <algorithm> #include <cstring> #include <cmath> #include <map> int cnt[3][30]; bool error(void) { for (int i=0; i<2; ++i) { for (int j=0…
由于第一次打,只能在div2打.(这么好的机会还没AK真是丢人) T1 Clarke and chemistry 枚举题不解释(我不会告诉你我上来WA了四发的) T2 Clarke and points 经典题目,计算一下x+y,x-y的最大值和最小值算一下即可. T3 Clarke and MST 按位贪心,从高到低位尽量放1,用并查集判判是否可行. --------------------------------------------------------------------- 因为…
树洞 CH Round #72 - NOIP夏季划水赛 描述 在一片栖息地上有N棵树,每棵树下住着一只兔子,有M条路径连接这些树.更特殊地是,只有一棵树有3条或更多的路径与它相连,其它的树只有1条或2条路径与其相连.换句话讲,这些树和树之间的路径构成一张N个点.M条边的无向连通图,而度数大于2的点至多有1个.近年以来,栖息地频繁收到人类的侵扰.兔子们联合起来召开了一场会议,决定在其中K棵树上建造树洞.当危险来临时,每只兔子均会同时前往距离它最近的树洞躲避,路程中花费的时间在数值上等于距离.为了在…
1.BestCoder Round #89 2.总结:4个题,只能做A.B,全都靠hack上分.. 01  HDU 5944   水 1.题意:一个字符串,求有多少组字符y,r,x的下标能组成等比数列. 2.总结:有个坑,y,r,x顺序组公比q>1,也可反着来x,r,y顺序组. #include<iostream> #include<cstring> #include<cmath> #include<queue> #include<algorit…
BestCoder Round #90 本次至少暴露出三个知识点爆炸.... A. zz题 按题意copy  Init函数 然后统计就ok B. 博弈 题  不懂  推了半天的SG.....  结果这个题.... C 数据结构题   我写了半个小时分块   然后发现     改的是颜色.... 我的天  炸炸炸 D. 没看懂题目要干啥.....  官方题解要搞死小圆…
BestCoder Round #7 Start Time : 2014-08-31 19:00:00    End Time : 2014-08-31 21:00:00Contest Type : Register Public   Contest Status : Ended Current Server Time : 2014-08-31 21:12:12 Solved Pro.ID Title Ratio(Accepted / Submitted)   1001 Little Pony…
Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 354    Accepted Submission(s): 100 Problem Description ZYB has a tree with N nodes,now he wants you to solve the numbers of nodes distanced no m…
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 175    Accepted Submission(s): 74 Problem Description ZYB has a premutation P,but he only remeber the reverse log of each prefix of the premutat…
题目传送门 /* 设一个b[]来保存每一个a[]的质因数的id,从后往前每一次更新质因数的id, 若没有,默认加0,nlogn复杂度: 我用暴力竟然水过去了:) */ #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <algorithm> using namespace std; ; const int INF = 0x3f3f…
题目传送门 /* 贪心水题:找出出现次数>1的次数和res,如果要减去的比res小,那么总的不同的数字tot不会少: 否则再在tot里减去多余的即为答案 用set容器也可以做,思路一样 */ #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <algorithm> using namespace std; ; const i…