
CF
文章平均质量分 63
WA你离我远点
加油加油!!!up up up!!!
展开
-
A. Grasshopper And the String
One day, the Grasshopper was jumping on the lawn and found a piece of paper with a string. Grasshopper became interested what is the minimum jump ability he should have in order to be able to reach th...转载 2018-06-15 20:50:59 · 245 阅读 · 0 评论 -
Restructuring Company CodeForces - 566D
Even the most successful company can go through a crisis period when you have to make a hard decision — to restructure, discard and merge departments, fire employees and do other unpleasant stuff. Let...原创 2018-08-27 21:31:16 · 147 阅读 · 0 评论 -
Longest k-Good Segment CodeForces - 616D
The array a with n integers is given. Let's call the sequence of one or more consecutive elements in a segment. Also let's call the segment k-goodif it contains no more than k different values.Find ...翻译 2018-08-28 21:09:24 · 189 阅读 · 0 评论 -
Problem K. Katryoshka
AC代码(第一种和第二种是重复的所以不必考虑第二种)Select Code#include <iostream>#include <stdio.h>#include <string.h>#include <algorithm>#include <queue>#include <cmath>#inclu...原创 2018-08-21 19:47:26 · 241 阅读 · 0 评论 -
Problem I. Important matches
AC代码(其实就是AC行和BD列的相交的部分的中间值)Select Code#include <bits/stdc++.h>using namespace std;int main(){ freopen("important.in","r", stdin); int t; int n, m, k, q, A, B, C, D, i, ...原创 2018-08-21 20:18:15 · 340 阅读 · 1 评论 -
Problem G. Glorious Stadium
AC代码(数学题从里向外画)Select Code#include <iostream>#include <stdio.h>#include <string.h>#include <algorithm>#include <queue>#include <cmath>#include <b...翻译 2018-08-21 20:30:45 · 273 阅读 · 0 评论 -
Mike and palindrome CodeForces - 798A
Mike has a string s consisting of only lowercase English letters. He wants to change exactly onecharacter from the string so that the resulting one is a palindrome.A palindrome is a string that read...原创 2018-08-29 19:21:02 · 193 阅读 · 0 评论 -
UEFA Champions League Gym - 101778I
StatementsConan is always busy investigating murders, and he rarely finds an opportunity to enjoy his time. His friend Ran told him that this lifestyle harms his health, and this may lead to prematu...原创 2018-09-05 10:11:11 · 320 阅读 · 0 评论 -
Rescue Haibara Gym - 101778E
Haibara is one of Conan's best friends. Conan sent her as a spy in order to discover the killer in one of his investigations. Haibara was on her first mission as a spy. Unfortunately, her mission did ...原创 2018-09-05 10:12:33 · 349 阅读 · 0 评论 -
Genta Game Gym - 101778H
Kojima Genta is one of the best friends of Conan, and the fattest one!Everyone believes that Genta is just thinking about food. So, he wants to prove the opposite. So, his friends challenged him in ...原创 2018-09-05 10:14:36 · 186 阅读 · 0 评论 -
Preparing for Exams Gym - 101778G
StatementsRan Mouri and Sonoko Suzuki are preparing for the final exams. They decided to study mathematics as it is the hardest subject for them. While they are solving mathematical problems, they f...原创 2018-09-05 11:10:02 · 285 阅读 · 0 评论 -
B. Vitamins
B. Vitaminstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland shop sells nn kinds of juices. Each juice has its price cici....翻译 2018-09-20 22:10:38 · 588 阅读 · 0 评论 -
Uberwatch Gym - 101873I
AC代码(dp 纪念一下第一次做dp的题目)Select Code#include <iostream>#include <map>#include <bits/stdc++.h>#define maxn 300010using namespace std;int dp[maxn];int a[maxn];int mx[maxn]...翻译 2018-08-23 15:37:59 · 396 阅读 · 0 评论 -
Pants On Fire Gym - 101873D
AC代码(第一次用map感觉map就像是一个很厉害的数组)Select Code#include <iostream>#include <map>#include <bits/stdc++.h>using namespace std;int mp[200][200];map<string, int>id;int ma...翻译 2018-08-23 15:09:44 · 388 阅读 · 0 评论 -
Problem K You Are Fired!
AC代码(水题, 先裁工资高的人就好了)Select Code#include <iostream>#include <bits/stdc++.h>using namespace std;struct node{ long long int x; char s[10];} a[10000+10];int cmp(struct...原创 2018-08-23 14:38:37 · 208 阅读 · 0 评论 -
A. Vasya and Socks
Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. When he comes home in the evening, Vasya takes off the used socks and throws them a...原创 2018-06-15 20:57:19 · 189 阅读 · 0 评论 -
A. Olesya and Rodion
Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies both of them.Your task is: given the n and t print an integer strict...转载 2018-06-15 20:59:45 · 136 阅读 · 0 评论 -
A. Wet Shark and Odd and Even
Today, Wet Shark is given n integers. Using any of these integers no more than once, Wet Shark wants to get maximum possible even (divisible by 2) sum. Please, calculate this value for Wet Shark. Note...原创 2018-06-15 21:03:03 · 224 阅读 · 0 评论 -
Cinema
Rami and K of his friends are going to watch a movie tonight. There are only one row that contains some available seats, all other rows are taken. Given the description of this row, Rami wants to know...原创 2018-08-06 08:03:44 · 189 阅读 · 0 评论 -
Playing With Strings
Dani and Mike are two kids ,They are playing games all day and when they don't find a game to play they invent a game . There is about an hour to arrive to school, because they love playing with strin...原创 2018-08-02 19:10:55 · 365 阅读 · 0 评论 -
Cupcakes Gym - 101243E
AC代码(思维题:只要K在某一个区间里面就可以实现让吃货打扫卫生这个区间最小是最大值之前每个人都吃一个最大值是在最大值之前的每一个人都吃自己能吃的最多的然后这个区间可以不断增加区间左端每次都加出了吃货每个人都吃1右区间每次增加所有人都吃最多的)Select Code#include <bits/stdc++.h>using namespace std;i...翻译 2018-08-15 19:43:44 · 204 阅读 · 0 评论 -
A. Fried Fish
AC代码(煎鱼,当锅的容量小于等于鱼的数量的时候就相当于把每条鱼分成两部分占一分钟但是占两条鱼的地方当锅的容量大于鱼的数目的时候就只能所有鱼一共煎两分钟)Select Code#include <iostream>#include <bits/stdc++.h>#define maxn 0x3f3f3f3fusing namespace std;...原创 2018-08-15 19:49:09 · 230 阅读 · 0 评论 -
D. Weather Station
AC代码(只要遍历一遍把有两个字母的方向记录下来然后*2就可以了)Select Code#include <iostream>#include <bits/stdc++.h>#define maxn 1000000007using namespace std;char c[100000+10];int main(){ freopen(...原创 2018-08-15 19:51:40 · 195 阅读 · 0 评论 -
G. Sphenic numbers
AC代码(唯一分解定理)Select Code#include <iostream>#include <bits/stdc++.h>#define maxn 0x3f3f3f3fusing namespace std;long long sm = 0;int k,s[20000];void w(long long n){ k = 0; ...原创 2018-08-15 19:53:00 · 221 阅读 · 0 评论 -
H. Non-random numbers
AC代码(1只有8种情况2~9有9种情况其余的位数有10种情况)Select Code#include <iostream>#include <bits/stdc++.h>#define maxn 0x3f3f3f3fusing namespace std;long long sm = 0;int main(){ int n, i; ...原创 2018-08-15 19:56:45 · 249 阅读 · 0 评论 -
Problem D. Digits
AC代码(暴力然后比较找最小的和)Select Code#include <iostream>#include <stdio.h>#include <string.h>#include <algorithm>#include <queue>#include <cmath>//#include <...翻译 2018-08-22 10:48:13 · 236 阅读 · 0 评论 -
A. Benches
A. Benchestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn benches in the Berland Central park. It is known that aiai...原创 2018-09-20 22:15:25 · 415 阅读 · 0 评论