
CodeForeces
CodeForeces
sizaif
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #453 (Div. 2) A-C
A;A. Visiting a Friendtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPig is visiting a fri原创 2017-12-20 07:44:33 · 329 阅读 · 0 评论 -
Codeforces 689D -Friends and Subsequences (RMQ查询-> ST表+二分)
D. Friends and Subsequencestime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputMike and !Mike are old childhoo原创 2018-01-31 14:48:45 · 288 阅读 · 0 评论 -
Codeforces Round #460 (Div. 2) A-D 题解
A:A. Supermarkettime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe often go to supermarkets to buy s原创 2018-02-01 10:52:58 · 368 阅读 · 0 评论 -
Codeforces 660C Hard Process (er)
C. Hard Processtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a with n elements.原创 2018-01-28 20:19:31 · 204 阅读 · 0 评论 -
Codeforeces 626D Jerry's Protest (思维 +DP)
D. Jerry's Protesttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrew and Jerry are playing a game with Harry as the scorekeeper. The game cons...原创 2018-02-11 12:36:46 · 250 阅读 · 0 评论 -
Codeforces Round #459 (Div. 2) C-The Monster (贪心)
C. The Monstertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs Will is stuck in the Upside Down, he can still communicate with his mom, Joyce, th...原创 2018-02-17 21:30:09 · 218 阅读 · 0 评论 -
Codeforces 702 B Powers of Two
B. Powers of Twotime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n integers a1, a2, ..., an. Find the number of pairs of indexes i, j...原创 2018-02-28 20:00:52 · 327 阅读 · 0 评论 -
Codeforces Round #462 (Div. 2) D-A Twisty Movement (枚举)
C. A Twisty Movementtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA dragon symbolizes wisdom, power and wealth. On Lunar New Year's Day, people m...原创 2018-02-22 19:29:11 · 371 阅读 · 1 评论 -
ACM ICPC NEERC, Northern Subregional Contest K:Key to Success
题目链接:https://odzkskevi.qnssl.com/bf224a6abe30b2581b0f33f6bc394c79?v=1523035391【K题思路;】 模拟凑数问题,如果前缀和 小于后面的数 -1 那么说明 中间某个数是凑不出来的, 就需要加上sum+1 这个数。 如果说都能凑出来那么, 再加一个 sum+1 在 sum - sum+sum+...原创 2018-04-10 12:46:20 · 204 阅读 · 0 评论 -
ACM ICPC 2008–2009, NEERC, Northern Subregional Contest :I题: Important Wires
题目链接:点击打开链接I 题题意输出为真的情况 : A | B | C | ~C[code]#include <iostream>#include <bits/stdc++.h>typedef long long ll;const int MAXN=1e5+5;using namespace std;vector<ll>V,ans;int...原创 2018-04-10 12:49:55 · 287 阅读 · 0 评论 -
ACM ICPC 2008–2009, NEERC, Northern Subregional Contest: B. Billboard
题目链接:点击打开链接B 题思路查询 暴力 一定是会超时的, 所以肯定用树状数组或者 线段树进行 logn 级别的查询。但是题目又想要求满足, 在满足的情况下尽可能的选择前面, 用线段树 维护, 得到的就是答案;【code】#include <iostream>#include <bits/stdc++.h>#define lson rt<<1,l,m...原创 2018-04-10 12:55:29 · 227 阅读 · 0 评论 -
Codeforces 794C. Naming Company (博弈)
题目传送门:http://codeforces.com/problemset/problem/794/CC. Naming Companytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOleg the client and Igor the ...原创 2018-04-24 17:48:16 · 410 阅读 · 0 评论 -
Southeast USA ICPC 2017 | GYM -101617 J:Treasure Map (DP or BFS)
Treasure Map时间限制: 1 Sec 内存限制: 128 MB提交: 128 解决: 25[提交][状态][讨论版][命题人:admin]题目描述You have found a treasure map! The map leads you to several gold mines. The mines each produce gold each day, but the am...原创 2018-04-29 13:11:00 · 238 阅读 · 0 评论 -
Codeforces Educational Codeforces Round 45 A-D
A:http://codeforces.com/contest/990/problem/A让 n 是 m 的整数倍, 的最小 花费 是多少#include <bits/stdc++.h>typedef long long ll;const int MAXN = 1e5+10;using namespace std;int main(){ ll n,m,a,b...原创 2018-06-11 20:38:28 · 367 阅读 · 0 评论 -
Codeforces Round #487 (Div. 2) @989-A,B,C
A题:http://codeforces.com/contest/989/problem/A满足ABC三个相邻就可以.#include <bits/stdc++.h>typedef long long ll;const int MAXN = 1e5 +10;#define fastIO ios_base::sync_with_stdio(0);using namespace ...原创 2018-06-15 18:04:20 · 175 阅读 · 0 评论 -
Codeforces 69E Subsegments (SET/线段树)
E. Subsegmentstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputProgrammer Sasha has recently begun to study原创 2018-01-23 10:24:36 · 495 阅读 · 0 评论 -
Codeforces 25D-Roads not only in Berland(并查集)
D. Roads not only in Berlandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland Government decided to原创 2018-01-23 10:17:50 · 345 阅读 · 0 评论 -
Educational Codeforces Round 36 (Rated for Div. 2) A-C
期末考试前 折腾折腾A:A. Gardentime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLuba thinks about w原创 2018-01-14 00:43:54 · 499 阅读 · 0 评论 -
Codeforces Round #449 (Div. 2) B Chtholly's request (预处理)
B. Chtholly's requesttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output— Thanks a lot for today.— I expe原创 2017-12-03 20:58:46 · 291 阅读 · 0 评论 -
Codeforces Round #449 (Div. 2) C. Nephren gives a riddle (DFS)
2017.12.4 烟台正是 大雪纷飞,漫天飞舞, 这是今年的第四场雪, 大雪纷纷何所似?未若柳絮因风起 ? C. Nephren gives a riddletime limit per test2 secondsmemory limit per test256 megabytesinputstandard input原创 2017-12-04 14:15:49 · 195 阅读 · 0 评论 -
Codeforece Educational Codeforces Round 34 (Rated for Div. 2) (A-D)题解
A:A. Hungry Student Problemtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIvan's classes a原创 2017-12-13 01:09:09 · 667 阅读 · 0 评论 -
Codeforces Round #454 (Div. 2, based on Technocup 2018 Elimination Round 4) A-C
这套题有史以来做的最恶心的一套题,没有之一;A题,讲的不明不白的。到底是区间还是这4个数,没有说明白, 交了7遍 全都是WA on test 4;因为一直认为就是这4个数里面选择 ,恶心, 实际要求是在区间里选定某个值;暴力枚举!!!!!!!A:A. Masha and Bearstime limit per test2 secondsm原创 2017-12-24 15:34:04 · 727 阅读 · 2 评论 -
Codeforces 768D Jon and Orbs (DP)
D. Jon and Orbstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputJon Snow is on the lookout for some orbs re原创 2017-12-06 21:02:05 · 251 阅读 · 0 评论 -
Codeforces Round #451 (Div. 2) A-B
A:A. Roundingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has a non-negative integ原创 2017-12-17 12:40:24 · 193 阅读 · 0 评论 -
Codeforces Round #452 (Div. 2) A-C
AA. Splitting in Teamstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere were n groups of students原创 2017-12-17 20:51:27 · 251 阅读 · 1 评论 -
Educational Codeforces Round 35 (Rated for Div. 2) A-D
A:A. Nearest Minimumstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an arra原创 2017-12-29 00:40:39 · 968 阅读 · 0 评论 -
Codeforeces Good Bye 2017 A-C
头实在是有点痛,做了两个就坚持不住了,躺了30分钟,脑袋里浑浑噩噩,什么都没有一片空白, 浑身发热。 这个夜晚睡得最难受的一晚了。AA. New Year and Counting Cardstime limit per test1 secondmemory limit per test256 megabytes原创 2018-01-02 18:22:45 · 345 阅读 · 0 评论 -
Codeforces Round #455 (Div. 2) A-C
A;A. Generate Logintime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe preferred way to ge原创 2017-12-28 08:31:39 · 1224 阅读 · 0 评论 -
CodeForces 68B Energy exchange (二分查找)
B. Energy exchangetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt is well known that the planet suffers原创 2018-01-21 11:24:52 · 563 阅读 · 0 评论 -
CodeForces 761D Dasha and Very Difficult Problem (数学分析,思维)
D. Dasha and Very Difficult Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDasha logged into the s原创 2018-01-21 11:34:04 · 218 阅读 · 0 评论 -
CodeForces - 707C Pythagorean Triples (数学)
C. Pythagorean Triplestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKatya studies in a fifth grade. Recen原创 2018-01-21 19:51:17 · 339 阅读 · 0 评论 -
Codeforces - 862B Mahmoud and Ehab and the bipartiteness (二分图)
B. Mahmoud and Ehab and the bipartitenesstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMahmoud and Ehab原创 2018-01-22 11:17:05 · 256 阅读 · 0 评论 -
Educational Codeforces Round 52 (Rated for Div. 2) C: Make It Equal(思维)
C. Make It Equaltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a toy building consisting of nn towers. Each tower cons...原创 2018-10-12 10:13:38 · 325 阅读 · 0 评论