CodeForces
文章平均质量分 78
TooSIMple_
十倍努力做突出一个!
展开
-
CodeForces - 507E Breaking Good
Breaking Good Breaking Good is a new video game which a lot of gamers want to have. There is a certain level in the game that is really difficult even for experienced gamers.Walter William, th原创 2017-03-13 17:45:19 · 407 阅读 · 0 评论 -
Codeforces 722C Destroying Array (并查集)
C. Destroying Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array consisting of n n原创 2018-01-31 09:59:35 · 213 阅读 · 0 评论 -
Codeforces 899D Shovel Sale (数学)
D. Shovel Saletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n shovels in Polycarp's shop. The i原创 2018-01-18 16:42:49 · 286 阅读 · 0 评论 -
Codeforces 300B Coach (并查集)
B. Coachtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA programming coach has n students to teach. We kn原创 2018-01-29 11:42:40 · 247 阅读 · 0 评论 -
Codeforces 939D Love Rescue(并查集)
D. Love Rescuetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputValya and Tolya are an ideal pair, but they原创 2018-02-27 09:32:39 · 237 阅读 · 0 评论 -
Codeforces 15C Industrial Nim(Nim博弈)
C. Industrial Nimtime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputThere are n stone quarries in Petrograd.原创 2018-03-30 21:43:57 · 423 阅读 · 0 评论 -
Codeforces 55C Pie or die (博弈)
C. Pie or dietime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVolodya and Vlad play the following game. The原创 2018-04-02 16:39:08 · 418 阅读 · 0 评论 -
Codeforces 78C Beaver Game (博弈)
C. Beaver Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo beavers, Timur and Marsel, play the following game.There are n logs, each of exac...原创 2018-04-04 21:20:01 · 378 阅读 · 0 评论 -
Codeforces 87C Interesting Game (sg博弈)
C. Interesting Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo best friends Serozha and Gena play a game.Initially there is one pile consi...原创 2018-04-05 10:42:38 · 443 阅读 · 0 评论 -
Codeforces 980B Marlin (构造)
B. Marlintime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe city of Fishtopia can be imagined as a grid of原创 2018-05-10 09:46:02 · 473 阅读 · 0 评论 -
Codeforces 911D Inversion Counting
D. Inversion Countingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA permutation of size n is an array o原创 2018-01-04 10:20:49 · 403 阅读 · 0 评论 -
Codeforces 900C Remove Extra One
C. Remove Extra Onetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutation p of length原创 2017-12-15 22:29:22 · 367 阅读 · 2 评论 -
CodeForces - 746C Tram
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe tram in Berland goes along a straight line from the point 0 t原创 2017-03-14 21:52:47 · 313 阅读 · 0 评论 -
CodeForces 106C Buns (多重背包)
C. Bunstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLavrenty, a baker, is going to make several buns wi原创 2017-08-26 11:07:56 · 330 阅读 · 0 评论 -
codeforces #1 题解
codeforces1A题目链接:http://codeforces.com/problemset/problem/1/A题意:给定一个n*m的矩形,然后给一个a*a的地板,求最少需要多少地板可以铺满这个矩形(不可以割断,可以重叠)思路:做除法上取整,然后结果相乘即可,(注意相乘的结果用long long 保存)【知识点】int数据范围#include using names原创 2017-11-07 19:41:32 · 354 阅读 · 0 评论 -
codeforces 870C Maximum splitting
C. Maximum splittingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given several queries. In the原创 2017-10-15 21:02:24 · 981 阅读 · 0 评论 -
codeforces876B Divisiblity of Differences
B. Divisiblity of Differencestime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given a multiset of n原创 2017-10-17 09:45:39 · 540 阅读 · 0 评论 -
codeforces875A Classroom Watch
A. Classroom Watchtime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputEighth-grader Vova is on duty today in th原创 2017-10-17 10:35:39 · 1704 阅读 · 0 评论 -
CodeForces 839D Winter is here (容斥原理)
题目链接:http://codeforces.com/problemset/problem/839/D题意:有n个士兵,每个士兵的力量值为a[i],现在按照输入的顺序选择k个数(即选择i,i+1,i+3,i+j....i+k),使得这k个数的最大公约数大于1,并计算gcd*k,然后对这些gcd*k求和思路:利用埃氏筛的原理,求出在a[j]的数组中有多少i的倍数,假设有x个数是i的倍数,则这原创 2017-11-28 16:59:59 · 280 阅读 · 0 评论 -
codeforces896A Nephren gives a riddle (dfs)
题目链接:http://codeforces.com/problemset/problem/896/A题意:给你一个数字n,代表f(n),然后给定数字k,在f(n)中查找第k个字符,如果k > f(n)的长度,返回‘.’;思路:在f(n)中找到f(n-1)处,递归查找即可#include #define LL long longusing namespace std;char原创 2017-12-03 16:59:39 · 548 阅读 · 1 评论 -
Codeforces 903D - Almost Difference
题目链接:http://codeforces.com/problemset/problem/903/D思路:对于一个给定的a[x]来说,对于 d(a[1],a[x]) + d(a[2],a[x])+.......+d(a[i].a[x])的结果是 i * a[x] - sum(sum为前x-1项元素的和) + (a[i] - a[x] == 1的所有数的和,即所有等于a[x]+1的数的和)原创 2017-12-14 22:25:52 · 464 阅读 · 0 评论 -
CodeForces 768E Game of Stones (Nim博弈)
题目链接:http://codeforces.com/problemset/problem/768/E题意:给定n堆石子,第i堆石子有a[i]个,两个玩家交替从n堆中取石子,不过如果一个玩家在第i堆中取过m个石子,则另一个玩家则不能在第i堆再取m个石子,最后不能取石子的人为输,jon赢则输出YES否则输出NO,jon为后手思路:对于玩家来说,第i堆石子不能拿以前拿过的数量,求出第i堆石子最原创 2017-12-06 17:41:46 · 320 阅读 · 0 评论 -
Codeforces Round #582 (3/8)
A.题目链接:http://codeforces.com/contest/1213/problem/A题意:把所有的chips都移动到同一个位置,求花费coins最少的移动方法。移动方法有两种:一是向左或者向右移动两个位置,不花费任何coins,二是向左或向右移动一个位置,花费一个coins。思路:分别求出奇数位置和偶数位置上chip的数目,取最小值。代码:#include...原创 2019-09-14 17:35:16 · 134 阅读 · 0 评论