
CodeForces
文章平均质量分 78
Joefery
生命不息,战斗不止。
展开
-
Codeforces 525D Arthur and Walls 【DFS】
D. Arthur and Wallstime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputFinally it is a day when Arthur has eno原创 2017-01-08 16:05:07 · 594 阅读 · 0 评论 -
Codeforces Round #344 (Div. 2) A. Interview【水题】
time limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputBlake is a CEO of a large company called "Blake Technologies"原创 2016-03-10 23:48:24 · 485 阅读 · 0 评论 -
B. Far Relative’s Problem【思维】
time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputFamil Door wants to celebrate his birthday with his friends原创 2016-03-11 13:54:32 · 624 阅读 · 0 评论 -
A. Far Relative’s Birthday Cake【排列组合】
time limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputDoor's family is going celebrate Famil Doors's birthday party原创 2016-03-11 19:02:42 · 709 阅读 · 0 评论 -
A. Again Twenty Five!【水题】
time limit per test 0.5 secondsmemory limit per test 64 megabytesinput standard inputoutput standard outputThe HR manager was disappointed again. The last applicant f原创 2016-03-11 19:26:27 · 482 阅读 · 0 评论 -
B. Making a String【水题】
time limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputYou are given an alphabet consisting of n letters, your task原创 2016-03-12 00:34:11 · 646 阅读 · 0 评论 -
B. Grandfather Dovlet’s calculator【水题】
time limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputOnce Max found an electronic calculator(计算器) from his grandfa原创 2016-03-12 11:09:07 · 820 阅读 · 0 评论 -
Codeforces Round #345 (Div. 2) A. Joysticks【水题】
A. Joystickstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFriends are going to play console. They have tw原创 2016-03-13 11:26:05 · 497 阅读 · 0 评论 -
Codeforces Round #345 (Div. 2) B. Beautiful Paintings【贪心】
B. Beautiful Paintingstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n pictures delivered for th原创 2016-03-13 11:57:34 · 886 阅读 · 0 评论 -
Codeforces Round #345 (Div. 2) C. Watchmen【规律】
C. Watchmentime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWatchmen are in a danger and Doctor Manhattan t原创 2016-03-13 19:17:01 · 707 阅读 · 0 评论 -
Codeforces Round #345 (Div. 2) D. Image Preview【二分】
D. Image Previewtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya's telephone contains n photos. Photo原创 2016-03-13 22:20:58 · 995 阅读 · 0 评论 -
Codeforces Round #344 (Div. 2) B. Print Check【思维】
B. Print Checktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKris works in a large company "Blake Technolo原创 2016-03-14 18:44:17 · 708 阅读 · 0 评论 -
Codeforces Round #344 (Div. 2) C. Report【水题】
C. Reporttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEach month Blake gets the report containing main原创 2016-03-15 16:38:02 · 541 阅读 · 0 评论 -
A. Robot Sequence【水题】
time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputCalvin the robot lies in an infinite rectangular grid. Calvi原创 2016-03-10 23:21:58 · 487 阅读 · 0 评论 -
CodeForces 606A Magic Spheres【水题】
DescriptionCarl is a beginner magician. He has a blue, b violet and c orange magic spheres. In one move he can transform two spheres of the same color into one sphere of any other color. To make原创 2016-11-05 02:00:14 · 578 阅读 · 0 评论 -
codeforces 746 A.Compote【水题】
A. Compotetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputNikolay has a lemons, b apples and c pears. He原创 2016-12-19 00:52:40 · 891 阅读 · 0 评论 -
codeforces 746 C. Tram【水题】
C. Tramtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe tram in Berland goes along a straight line from原创 2016-12-19 00:57:04 · 796 阅读 · 0 评论 -
codeforces 746 B. Decoding【水题】
B. Decodingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp is mad about coding, that is why he wri原创 2016-12-19 00:54:29 · 889 阅读 · 0 评论 -
CodeForces 560A Currency System in Geraldion 【水题】
DescriptionA magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several values. But the problem is, the system is not perfect and sometimes it happens th原创 2016-10-19 22:25:09 · 687 阅读 · 0 评论 -
CodeForces 598D Igor In the Museum【dfs】
DescriptionIgor is in the museum and he wants to see as many pictures as possible.Museum can be represented as a rectangular field of n × m cells. Each cell is either empty or impassable. Empty原创 2016-10-29 15:02:12 · 463 阅读 · 0 评论 -
CodeForces 706B Interesting drink【水题】
DescriptionVasiliy likes to rest after a hard work, so you may often meet him in some bar nearby. As all programmers do, he loves the famous drink "Beecola", which can be bought in n different s原创 2016-10-19 01:43:00 · 718 阅读 · 0 评论 -
CodeForces 706A Beru-taxi 【水题】
DescriptionVasiliy lives at point (a, b) of the coordinate plane. He is hurrying up to work so he wants to get out of his house as soon as possible. New app suggested n available Beru-taxi nearb原创 2016-10-19 01:40:55 · 547 阅读 · 0 评论 -
CodeForces 405D Toy Sum【思维】
DescriptionLittle Chris is very keen on his toy blocks. His teacher, however, wants Chris to solve more problems, so he decided to play a trick on Chris.There are exactly s blocks in Chris's set原创 2016-11-06 17:12:14 · 725 阅读 · 0 评论 -
CodeForces 405C Unusual Product【思维】
DescriptionLittle Chris is a huge fan of linear algebra. This time he has been given a homework about the unusual square of a square matrix.The dot product of two integer number vectors x and y原创 2016-11-06 16:55:34 · 547 阅读 · 0 评论 -
CodeForces 405B Domino Effect【模拟】
DescriptionLittle Chris knows there's no fun in playing dominoes, he thinks it's too random and doesn't require skill. Instead, he decided to play with the dominoes and make a "domino show".Chri原创 2016-11-06 16:30:01 · 500 阅读 · 0 评论 -
CodeForces 405A Gravity Flip【水题】
DescriptionLittle Chris is bored during his physics lessons (too easy), so he has built a toy box to keep himself occupied. The box is special, since it has the ability to change gravity.There a原创 2016-11-06 16:23:01 · 614 阅读 · 0 评论 -
CodeForces 606B Testing Robots【读题题QAQ】
DescriptionThe Cybernetics Failures (CF) organisation made a prototype of a bomb technician robot. To find the possible problems it was decided to carry out a series of tests. At the beginning of原创 2016-11-05 02:25:03 · 560 阅读 · 0 评论 -
Educational Codeforces Round 9 B. Alice, Bob, Two Teams【水题】
B. Alice, Bob, Two Teamstime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob are playing a game原创 2016-03-16 20:28:58 · 524 阅读 · 0 评论 -
Educational Codeforces Round 9 C. The Smallest String Concatenation【思维】
C. The Smallest String Concatenationtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou're given a list of原创 2016-03-16 21:45:14 · 768 阅读 · 0 评论 -
Educational Codeforces Round 9 A. Grandma Laura and Apples【水题】
A. Grandma Laura and Applestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGrandma Laura came to the market原创 2016-03-16 20:35:22 · 564 阅读 · 0 评论 -
ural 1984. Dummy Guy 【几何】
1984. Dummy GuyTime limit: 0.5 secondMemory limit: 64 MBEvery year students of our university participate in Regional Contest in Saint Petersburg. Train journeys from Yekaterinburg to Sa原创 2016-09-07 20:38:15 · 485 阅读 · 0 评论 -
CodeForces - 630C Lucky Numbers【计数】
题目链接题意:定义只由7和8组成的数字为幸运数字,现给出一整数n,问位数不超过n位的数字中有多少个幸运数字找了好久,才发现规律 T_T 没救了。。ans=2+2^2+2^3+…+2^n=2*(2^n-1) #include#include#include#include#include#include#include#inc原创 2016-06-01 21:42:14 · 646 阅读 · 0 评论 -
codeforces #630 E. A rectangle 【数学】
题目链接推公式就好了,注意爆int#include#include#include#include#includeusing namespace std;int main(){ long long x0,y0,x,y; cin>>x0>>y0>>x>>y; cout<<((x-x0)/2+1)*((y-y0)/2+1)+(x-x0)*(原创 2016-07-13 12:56:58 · 607 阅读 · 0 评论 -
Codeforces 598A Tricky Sum【计数】
A. Tricky Sumtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn this problem you are to calculate the sum o原创 2016-08-20 03:35:26 · 628 阅读 · 0 评论 -
codeforces 707 C Pythagorean Triples【数学】
C. Pythagorean Triplestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKatya studies in a fifth grade. Recen原创 2016-08-21 03:23:28 · 1341 阅读 · 0 评论 -
codeforces #630 F. Selection of Personnel
题目链接排列组合 计算 C(N,5)+C(N,6)+C(N,7)#include#include#include#include#includeusing namespace std;typedef long long LL;LL C(LL n,LL r){ LL i,j,s=1; if(n-r<r)r=n-r; for(i=0,j=1;i<r原创 2016-07-13 13:16:33 · 559 阅读 · 0 评论 -
codefoces #630 G. Challenge Pennants
题目链接#include#include#include#include#includeusing namespace std;typedef long long LL;LL C(LL n,LL r){ LL i,j,s=1; if(r>n)return 0; if(n-r<r)r=n-r; for(i=0,j=1;i<r;i++){原创 2016-07-13 15:28:55 · 466 阅读 · 0 评论 -
codeforces 630H. Benches
题目链接一座城市有n条南北走向的街道和n条东西走向的街道,现要将5条不用的长凳放置在街道相交处,且同一条街道上的长凳数不超过一条,问有多少种放置方案 #include#include#include#include#includeusing namespace std;typedef long long LL;LL C(LL n,LL r){ LL i原创 2016-07-13 18:54:53 · 474 阅读 · 0 评论 -
codeforces #630 I. Parking Lot
题目链接4种不同的汽车,有2n-2个停车位,要求恰有n辆相同的车排在一起,问有多少种停车方案 分类讨论:1)n辆车在停车场两端,方案数为2*4*3*4^(n-3),2)n辆车不在两端,方案为4*(n-3)3*3*4^(n-4),所以总的停车方案有 24*4^(n-3)+36(n-3)*4^(n-4) #include原创 2016-07-13 20:09:57 · 442 阅读 · 0 评论 -
Codeforces 217A. Ice Skating 【并查集】
A. Ice Skatingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBajtek is learning to skate on ice. He's a b原创 2016-08-30 22:08:37 · 662 阅读 · 0 评论