CodeForces
文章平均质量分 53
swqeaaa
有问题可以吻我
展开
-
Codeforces 1003 C Intense Heat
http://codeforces.com/contest/1003/problem/C InputThe first line contains two integers nn and kk (1≤k≤n≤50001≤k≤n≤5000) — the number of days in the given period, and the minimum number of day...原创 2018-07-05 15:11:46 · 198 阅读 · 0 评论 -
CodeForces 876 B Divisiblity of Differences
B. Divisiblity of Differencestime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given a multiset of n integers. You should s...原创 2018-07-29 10:00:32 · 103 阅读 · 0 评论 -
CodeForces 877 B Nikita and string
B. Nikita and stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Nikita found the string containing letters "a" and "...原创 2018-07-29 10:02:09 · 250 阅读 · 0 评论 -
CodeForces - 877C Slava and tanks
C. Slava and tankstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSlava plays his favorite game "Peace Lightning". Now he is fly...原创 2018-07-29 10:03:21 · 219 阅读 · 0 评论 -
CodeForces - 878A Short Program
A. Short Programtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya learned a new programming language CALPAS. A program in th...原创 2018-07-29 10:04:53 · 229 阅读 · 0 评论 -
CodeForces - 884B Japanese Crosswords Strike Back
http://codeforces.com/problemset/problem/884/B#include<cstdio>#include<algorithm>#include<iostream>#include<cstring>using namespace std;int main(){ int x,n; ...原创 2018-07-29 10:07:48 · 233 阅读 · 0 评论 -
CodeForces - 884C Bertown Subway
http://codeforces.com/problemset/problem/884/C #include<cstdio>#include<iostream>using namespace std;int main(){ int n; cin>>n; int p[123456]; for(int i=1;...原创 2018-07-29 10:08:48 · 250 阅读 · 0 评论 -
CodeForces - 886C Petya and Catacombs
http://codeforces.com/problemset/problem/886/C #include<cstdio>#include<iostream>using namespace std;int main(){ int n; cin>>n; int p[123456]; for(int i=1;...原创 2018-07-29 10:09:47 · 167 阅读 · 0 评论 -
CodeForces - 868A Bark to Unlock
http://codeforces.com/problemset/problem/868/A #include<cstdio>#include<iostream>#include<vector>using namespace std;bool ans=0;int main(){ int n; char x,y; i...原创 2018-07-29 10:10:36 · 133 阅读 · 0 评论 -
CodeForces - 868B Race Against Time
http://codeforces.com/problemset/problem/868/B#include<cstdio>#include<iostream>using namespace std;double h,m,s,t1,t2;double H,M,S,T1,T2;double TM;double Tm;bool f1(){ if(...原创 2018-07-29 10:11:25 · 169 阅读 · 0 评论 -
CodeForces - 864C Bus
http://codeforces.com/problemset/problem/864/C#include<iostream>using namespace std;#define ll long longint main(){ ll a,b,f,k; cin>>a>>b>>f>>k; ll x...原创 2018-07-29 10:12:52 · 130 阅读 · 0 评论 -
CodeForces 864 D Make a Permutation!
http://codeforces.com/problemset/problem/864/D #include<cstdio>int a[200010],vis[200010];int main() { int i,j,n,ans; scanf("%d",&n); for(i=0; i<n; i++) { scan...原创 2018-07-30 08:17:46 · 198 阅读 · 0 评论 -
CodeForces - 864E Fire
http://codeforces.com/problemset/problem/864/E#include<iostream>#include<algorithm>#include<cstdio>using namespace std;int dp[108][2018],l[108][2028];struct node{ int t,...原创 2018-08-05 19:36:04 · 142 阅读 · 0 评论 -
CodeForces - 863B Kayaking
http://codeforces.com/problemset/problem/863/B#include<cstdio>#include<algorithm>#include<iostream>#include<cstring>using namespace std;int w[1314];int n;int Sum(in...原创 2018-08-05 19:36:09 · 191 阅读 · 0 评论 -
【CodeForces】1011 A Stages
A. Stagestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputNatasha is going to fly to Mars. She needs to build a rocket, which cons...原创 2018-08-19 23:54:49 · 100 阅读 · 0 评论 -
http://codeforces.com/contest/1011/problem/B
B. Planning The Expeditiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputNatasha is planning an expedition to Mars for nn people...原创 2018-08-11 23:50:38 · 93 阅读 · 0 评论 -
http://codeforces.com/contest/1006/problem/A
A. Adjacent Replacementstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMishka got an integer array aa of length nn as a birthday...原创 2018-08-11 23:50:58 · 125 阅读 · 0 评论 -
1006/problem/B Polycarp's Practice
B. Polycarp's Practicetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp is practicing his problem solving skill. He has a...原创 2018-08-11 23:51:02 · 119 阅读 · 0 评论 -
/1006/problem/C Three Parts of the Array
C. Three Parts of the Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array d1,d2,…,dnd1,d2,…,dn consisting...原创 2018-08-11 23:51:08 · 87 阅读 · 0 评论 -
/1006/problem/D Two Strings Swaps
D. Two Strings Swapstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two strings aa and bb consisting of lowercase ...原创 2018-08-11 23:51:12 · 121 阅读 · 0 评论 -
/1006/problem/E Military Problem
E. Military Problemtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn this problem you will have to help Berland army with organ...原创 2018-08-20 22:52:27 · 128 阅读 · 0 评论 -
/1006/problem/F Xor-Paths
F. Xor-Pathstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a rectangular grid of size n×mn×m. Each cell has a number w...原创 2018-08-20 22:52:33 · 117 阅读 · 0 评论 -
/1009/problem/A Game Shopping
A. Game Shoppingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMaxim wants to buy some games at the local game shop. There are n...原创 2018-08-20 22:52:37 · 137 阅读 · 0 评论 -
/1009/problem/B Minimum Ternary String
B. Minimum Ternary Stringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a ternary string (it is a string which con...原创 2018-08-20 22:52:45 · 93 阅读 · 0 评论 -
/1009/problem/C Annoying Present
C. Annoying Presenttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice got an array of length nn as a birthday present once ag...原创 2018-08-20 22:52:55 · 165 阅读 · 0 评论 -
/1009/problem/D Relatively Prime Graph
D. Relatively Prime Graphtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's call an undirected graph G=(V,E)G=(V,E) relativel...原创 2018-08-21 19:40:16 · 154 阅读 · 0 评论 -
/1009/problem/E Intercity Travelling
E. Intercity Travellingtime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLeha is planning his journey from Moscow to Saratov. He...原创 2018-09-06 20:49:01 · 177 阅读 · 0 评论 -
/1008/problem/A Romaji
A. Romajitime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVitya has just started learning Berlanese language. It is known that Be...原创 2018-09-06 20:49:09 · 129 阅读 · 0 评论 -
/1008/problem/B Turn the Rectangles
B. Turn the Rectanglestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn rectangles in a row. You can either turn each...原创 2018-09-06 20:49:14 · 100 阅读 · 0 评论 -
/1008/problem/C Reorder the Array
C. Reorder the Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array of integers. Vasya can permute (chang...原创 2018-09-06 20:49:19 · 82 阅读 · 0 评论 -
/1005/problem/A Tanya and Stairways
A. Tanya and Stairwaystime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle girl Tanya climbs the stairs inside a multi-storey b...原创 2018-09-06 20:49:23 · 106 阅读 · 0 评论 -
1005/problem/B Delete from the Left
B. Delete from the Lefttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two strings ss and tt. In a single move, you...原创 2018-09-06 20:49:32 · 237 阅读 · 0 评论 -
/1005/problem/C Summarize to the Power of Two
C. Summarize to the Power of Twotime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA sequence a1,a2,…,ana1,a2,…,an is called good i...原创 2018-09-06 20:49:37 · 109 阅读 · 0 评论 -
/1004/problem/A Sonya and Hotels
A. Sonya and Hotelstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSonya decided that having her own hotel business is the best w...原创 2018-08-19 23:54:30 · 177 阅读 · 0 评论 -
/1004/problem/B Sonya and Exhibition
B. Sonya and Exhibitiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSonya decided to organize an exhibition of flowers. Since ...原创 2018-09-06 20:49:44 · 107 阅读 · 0 评论 -
/problem/A Polycarp's Pockets
A. Polycarp's Pocketstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp has nn coins, the value of the ii-th coin is aiai. ...原创 2018-08-22 22:38:01 · 201 阅读 · 0 评论 -
Codeforces 1003 B Binary String Constructing
B. Binary String Constructingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given three integers aa, bb and xx. Your tas...原创 2018-07-30 08:19:07 · 178 阅读 · 0 评论 -
Codeforces 1003 C Intense Heat
C. Intense Heattime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe heat during the last few days has been really intense. Scient...原创 2018-07-30 08:18:55 · 150 阅读 · 0 评论 -
/997/problem/A Convert to Ones
A. Convert to Onestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got a string a1,a2,…,ana1,a2,…,an, consisting of zeros a...原创 2018-08-22 22:37:55 · 137 阅读 · 0 评论 -
Codeforces 998 A Balloons
A. Balloonstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are quite a lot of ways to have fun with inflatable balloons. Fo...原创 2018-08-06 15:15:33 · 130 阅读 · 0 评论