随笔分类 - 比赛————CF
Codeforces Round #272 (Div. 1) A. Dreamoon and Sums(数论)
摘要:题目链接Dreamoon loves summing up something for no reason. One day he obtains two integersaandboccasionally. He wants to calculate the sum of allniceinteg...
阅读全文
Codeforces Round #263 (Div. 2) D. Appleman and Tree(树形DP)
摘要:题目链接D. Appleman and Treetime limit per test :2 secondsmemory limit per test:256 megabytesinput :standard inputoutput:standard outputAppleman has a tre...
阅读全文
Codeforces Round #263 (Div. 2) A B C
摘要:题目链接A. Appleman and Easy Tasktime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputToastman came u...
阅读全文
Codeforces Round #262 (Div. 2) A B C
摘要:题目链接A. Vasya and Sockstime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputVasya hasnpairs of soc...
阅读全文
Codeforces Round #260 (Div. 2) A~C
摘要:题目链接A. Laptopstime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputOne day Dima and Alex had an ar...
阅读全文
Codeforces Round #259 (Div. 2) C - Little Pony and Expected Maximum (数学期望)
摘要:题目链接题意 : 一个m面的骰子,掷n次,问得到最大值的期望。思路 : 数学期望,离散时的公式是E(X) = X1*p(X1) + X2*p(X2) + …… + Xn*p(Xn)p(xi)的是所有最大值是xi的情况数/总情况数一共是m^n种,掷n次,所有最大值是xi的情况数应该是xi^n,但是这里...
阅读全文
Codeforces Round #258 (Div. 2)(A,B,C,D)
摘要:题目链接A. Game With Stickstime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputAfter winning gold and...
阅读全文
Codeforces Round #243 (Div. 2) A~C
摘要:题目链接A. Sereja and Mugstime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputSereja showed an intere...
阅读全文
Codeforces Round #242 (Div. 2) A~C
摘要:题目链接A. Squatstime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputPasha has many hamsters and he m...
阅读全文
Coder-Strike 2014 - Round 1(A~E)
摘要:题目链接A. Postertime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputThe R1 company has recently boug...
阅读全文
RCC 2014 Warmup (Div. 2) ABC
摘要:题目链接A. Eliminationtime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputThe finalists of the "Russi...
阅读全文
Codeforces Round #241 (Div. 2) A. Guess a number!
摘要:题目链接题意 : 就是猜数游戏,根据给定的操作,让你输出一个符合条件的。思路 : 这个题好玩儿,设置两个变量,一个找符合条件的数的上限,一个找下限,再判断一下。 1 #include 2 #include 3 #include 4 5 using namespace std ; 6 7 c...
阅读全文
Codeforces Round #240 (Div. 2)(A -- D)
摘要:点我看题目A. Mashmokh and Lightstime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputMashmokh works in a factory. At the end of each day he must turn off all of the lights.The lights on the factory are indexed from1ton. There arenbuttons in Mashmokh'
阅读全文
Codeforces Round #239 (Div. 2) C. Triangle
摘要:time limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputThere is a right triangle with legs of lengthaandb. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the co
阅读全文
Codeforces Round #237 (Div. 2)
摘要:链接A. Valera and Xtime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputValera is a little boy. Yesterday he got a huge Math hometask at school, so Valera didn't have enough time to properly learn the English alphabet for his English lesson. Unfo
阅读全文
Codeforces Round #236 (Div. 2)
摘要:A. Nutstime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputYou haveanuts and lots of boxes. The boxes have a wonderful feature: if you putx(x ≥ 0)divisors (the spacial bars that can divide a box) to it, you get a box, divided intox + 1sections.You
阅读全文
CF Codeforces Round #231 (Div. 2)
摘要:http://codeforces.com/contest/394话说这次CF做的超级不爽,A题一开始交过了,我就没再管,B题还没看完呢,就死困死困的,后来觉得B题枚举一下估计能行,当时是觉得可以从后往前乘,但是细节什么的都没想好,所以干在纸上画也没写出什么来。没想到我A题竟然忘了一种情况,就是+前就一根的时候,郁闷死我了。A Counting Sticks#include #include #include #include using namespace std ;int main(){ char sh[5200] ; while(~scanf("%s",sh)) {
阅读全文
Codeforces Round #230 (Div. 2) C Blocked Points
摘要:题目链接题意 : 给你一个半径为n的圆,圆里边还有圆上都有很多整点,让你找出与圆外的任意一个整点距离等于1的点。思路 :这个题可以用枚举,画个图就发现了,比如说先数第一象限的,往下往右找,还可以找规律,看到神代码就4行,我十分佩服数学学的特别好的人。。。。大神博客地址下边这个是枚举的代码,也很简单。#include#include#includeusing namespace std;#define LL __int64LL dis(LL x,LL y){ return x*x+y*y;}int main(){ LL n; LL i,s; while(~scanf("%...
阅读全文
Codeforces Round #224 (Div. 2)
摘要:http://codeforces.com/contest/382A . Ksenia and Pan Scales题意 : 每个大写字母都占相同的重量,第一个字符串指的是天平两边现在有的砝码分布,而第二个字符串是想让你把第二个字符串全部的砝码放到第一个字符串上,看“|”两边的字母是不是一样多。思路 :算是一个简单小模拟吗?#include #include #include #include #include using namespace std ;int main(){ char str[110] ; char str1[110] ; while(scanf("%s"
阅读全文
CF 217 B. Berland Bingo
摘要:http://codeforces.com/contest/370/problem/B题意 :呃,这个题我说不清楚。。。。就是有n个人,第 i 个人手里有 mi 张牌,如果,现在主人念数,念到哪张牌谁就把哪张删掉,最后谁手里没有了谁就赢,如果同时没有了,两个人都输都输出no,最重要的是Write a program that determines whether a player can win the game at the most favorable for him scenario or not.这句话,意思是说每个人都按照每个人想要的哪种方式去念牌,根据样例,第一个人手里有1张牌,是
阅读全文
浙公网安备 33010602011771号