CFRound#379(div2)】的更多相关文章

题目链接:http://codeforces.com/contest/734 A:SB题. #include<cstdio> #include<cstring> #include<algorithm> #define maxn 100005 using namespace std; int n,num1,num2; char s[maxn]; int main(){ scanf("%d",&n);scanf("%s",s+…
题目链接:http://codeforces.com/contest/738 A题:SB题. B题:SB题. C题:二分. D题:贪心. E题:乱搞. F题:设f[i][j][k]代表甲先手,左边消去了i个,右边消去了i+j个,上一次消去k个时答案.g[i][j][k]乙先手.可以证明j<=sqrt(2n),k<=sqrt(2n).o(n^2). 代码: A: #include<cstdio> #include<cstring> #include<algorith…
用小号做的div2 A:竟然看错了排序顺序...白白WA了两发 注意读入一整行(包括空格):getline(cin,st) [gets也是资瓷的 #include<iostream> using namespace std; ]; ]; int T,N; void qsort(int l,int r) { int i=l,j=r; ; int mid=d[m]; while(i<j) { while(d[i]<mid) i++; while(d[j]>mid) j--; if…
题意: 思路: Codeforces Round #370(Solved: 4 out of 5) A - Memory and Crow 题意:有一个序列,然后对每一个进行ai = bi - bi + 1 + bi + 2 - bi + 3.... 的操作,最后得到了a 序列,给定 a 序列,求原序列. 思路:水. #include <set> #include <map> #include <stack> #include <queue> #includ…
379. Design Phone Directory Design a Phone Directory which supports the following operations: get: Provide a number which is not assigned to anyone. check: Check if a number is available or not. release: Recycle or release a number. Example: // Init…
A.Anton and Danik Problems: 给你长度为N的,只含'A','D'的序列,统计并输出何者出现的较多,相同为"Friendship" Analysis: lucky_ji: 水题,模拟统计A和D的数目比较大小输出结果即可 Tags: Implementation B.Anton and Digits Problems: 给定k2个2,k3个3,k5个5及k6个6,可以组成若干个32或256,求所有方案中Sigma的最大值 Analysis: lucky_ji: 同…
$('div a'):div标签下所有层次a元素的jquery对象 $('div>a'):div标签下子元素层次a元素的jquery对象 <body> <div class='div'> </div> <div class='div2'> </div> <div class='div2'> </div> </body> .div ~ .div2{ width:20px; height:20px; back…
-------一直想打SRM,但是感觉Topcoder用起来太麻烦了.题目还是英文,不过没什么事干还是来打一打好了.但是刚注册的号只能打DIV2,反正我这么弱也只适合DIV2了.. T1: 题目大意: 给出8*8的棋盘判断是不是每行每列都有且只有1个棋子. 题解:不知怎么写题解.. T2: 题目大意: 有E个E,EM个EM,M个M,MH个MH,H个H.  都小于等于100000. 然后1个EM可以变成1个E或者M,1个MH可以变成1个M或者H. 求max{min{E,M,H}}. 题解: 我是直…
This is the first time I took part in Codeforces Competition.The only felt is that my IQ was contempted.The problem in Div2 was so...em,how to say,anyway I even daren't to believe.Yesterday I solved two fifths of problems.You see? I'm just a guy full…
真的是b到不行啊! 尼玛C题一个这么简单的题目没出 aabbccddee 正确的是aabccdee 我的是   aabcdee 硬是TM的不够用,想半天还以为自己的是对的... A:题... B:题... 妈蛋,我做完A题第一的3分钟后D题出来了... 这TM的还是div2,到底还是我太弱了!…