codeforces
文章平均质量分 71
_TianZhirui
我比昨天更强???
展开
-
Educational Codeforces Round 76 (Rated for Div. 2)
原题目链接:https://codeforces.com/contest/1257/problem/CC. Dominated Subarray题意:如果一个数组中一个元素的个数比其他都多,且这个元素个数最少为2,求这个数组中的子数组,使得子数组也满足这样一个规律。#include<bits/stdc++.h>using namespace std;void solv...原创 2019-11-14 19:07:21 · 183 阅读 · 0 评论 -
cf935C
C. Fifa and Fafatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFifa and Fafa are sharing a flat. Fifa love原创 2018-02-21 22:41:32 · 345 阅读 · 0 评论 -
CodeForces470B
B. Primal Sporttime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob begin their day with a quick game. They first choose a starting num...原创 2018-03-16 01:09:34 · 114 阅读 · 0 评论 -
Codeforces Round #469 (Div. 2)
开学啦!A. Left-handers, Right-handers and Ambidexterstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are at a water bowling training. There are l ...原创 2018-03-09 23:00:06 · 169 阅读 · 0 评论 -
Codeforces Round #469 (Div. 2)
B. Intercepted Messagetime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputHacker Zhorik wants to decipher two secret messages he intercepted yesterday....原创 2018-03-09 23:01:57 · 124 阅读 · 0 评论 -
Codeforces Round #469 (Div. 2) D. A Leapfrog in the Array (思维)
#includeusing namespace std;int main(){ long long n; int m; cin>>n>>m; long long x; for(int i=1;i<=m;i++){ cin>>x; while(x%2==0) x+=n-x/2; cout<<(x/2)+1<<endl; } return 0;}原创 2018-03-10 10:41:36 · 240 阅读 · 0 评论 -
Codeforces Round #469 (Div. 1)A
C. Data Center Maintenancetime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputBigData Inc. is a corporation tha原创 2018-03-10 10:51:01 · 237 阅读 · 0 评论 -
CodeForces470C
C. Producing Snowtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice likes snow a lot! Unfortunately, this year's winter is already over, and she...原创 2018-03-13 17:08:06 · 130 阅读 · 0 评论 -
codeforces_273C
C. Table Decorationstime limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputYou have r red, g green and b blu原创 2018-05-01 16:11:46 · 124 阅读 · 0 评论 -
Codeforces520C_快速幂
题意:给出一个01串,每次询问区间[l,r][l,r] 每次可以将区间内一个数取出,并且答案加上这个数的值,区间内剩余的数也加上这个值,求如何安排取出顺序使得答案最大。#include <bits/stdc++.h>using namespace std;#define ll long long#define N 100011const ll MOD = (ll)1...原创 2018-11-22 12:47:37 · 591 阅读 · 0 评论 -
Codeforeces463C
题意:给出一个n*n的棋盘,每个方格中有一个非负整数,在棋盘中放两个象,使得这两个象既不会互相攻击,攻击范围也不能有重合,并且在这两个象攻击范围内的格子中的值的总和最大,输出总和和两个象的位置坐标。如果一个格子和象在一条对角线上,则这个格子就在这个象的攻击范围内。分析:简单分析可以得出:位于同一条主对角线上元素Map[i][j]满足i-j相同,位于同一条副对角线上的元素Map[i][j]满足i+...原创 2018-11-22 16:56:19 · 113 阅读 · 0 评论 -
Codeforces Round #529 (Div. 3) CPowers Of Two
#include<cstdio>#include<cstring>#include<algorithm>#include<queue>#include<set>#include<map>#include<vector>#include<cmath>#include&am原创 2018-12-29 21:37:17 · 157 阅读 · 0 评论 -
Educational Codeforces Round 64
题目链接:http://codeforces.com/contest/1156B题,构造或者贪心C题,二分.#include<bits/stdc++.h>using namespace std;typedef long long ll;int main(){ ll n,z; cin>>n>>z; ll x[n]; for(int ...原创 2019-05-02 16:07:51 · 113 阅读 · 0 评论 -
cf935B
B. Fafa and the Gatestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo neighboring kingdoms decided to b原创 2018-02-21 22:40:28 · 235 阅读 · 0 评论 -
cf935A
A. Fafa and his Companytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFafa owns a company that works on hu原创 2018-02-21 22:39:19 · 218 阅读 · 0 评论 -
cf460d2t3 C. Seat Arrangements
C. Seat Arrangementstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSuppose that you are in a campus and ha原创 2018-02-02 15:23:42 · 177 阅读 · 0 评论 -
423B. Black Square
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp has a checkered sheet of paper of size n × m. Polycarp pai原创 2017-07-12 13:26:11 · 292 阅读 · 0 评论 -
cf424div2 A. Unimodal Array
A. Unimodal Array#include using namespace std;int n,a[100007];int main(){cin>>n;for(int i=1;i<=n;i++) scanf("%d",a+i);int L=1,R=n;while(L<n&&a[L]<a[L+1])++L;while(R>1&&a[R]<a[R-1])--R原创 2017-07-14 15:06:48 · 167 阅读 · 0 评论 -
Codeforces Round 23
A. Treasure Hunttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputCaptain Bill the Hummingbird and his crew recieved an interesting challenge offe...原创 2017-06-17 07:49:46 · 289 阅读 · 0 评论 -
cfRound425B. Petya and Exam
B. Petya and Examtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt's hard times now. Today Petya needs to score 100原创 2017-07-26 11:04:11 · 222 阅读 · 0 评论 -
cf round425A. Sasha and Sticks
A. Sasha and Stickstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt's one more school day now. Sasha doesn't like原创 2017-07-26 11:07:09 · 314 阅读 · 0 评论 -
cf424div2 B. Keyboard Layouts
B. Keyboard Layoutstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are two popular keyboard layouts i原创 2017-07-14 15:21:18 · 245 阅读 · 0 评论 -
Codeforces Round #447 (Div. 2) C. Marco and GCD Sequence(构造)
题目原文:In a dream Marco met an elderly man with a pair of black glasses. The man told him the key to immortality and then disappeared with the wind of time.When he woke up, he only remembered that the k原创 2017-11-21 13:39:11 · 199 阅读 · 0 评论 -
CF450 C
C. Remove Extra Onetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutation p of length原创 2017-12-13 15:17:28 · 183 阅读 · 0 评论 -
CF899DShovel Sale
中文题意:从1-n挑两个数,加起来后缀9最多。输出有几组。D. Shovel Saletime limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard output原创 2017-12-22 19:47:13 · 343 阅读 · 1 评论 -
CF899E
E. Segments Removaltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has an array of integers of lengt原创 2017-12-22 21:05:21 · 380 阅读 · 0 评论 -
Codeforces Round451C
中文题意:打印朋友们的电话号码,一个人可以有很多个电话号码,如果他的一个电话号码是以另一个电话号码结尾,就不输出。涉及知识点:map,set,还有字典树C. Phone Numberstime limit per test2 secondsmemory limit per test256 megabytesinputstandard in原创 2017-12-17 21:18:18 · 254 阅读 · 0 评论 -
cf460d2 动态规划+深度优先搜索
D. Substringtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a graph with n nodes and m direc原创 2018-02-02 15:21:00 · 184 阅读 · 0 评论 -
423ARestaurant Tables
A. Restaurant Tablestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn a small restaurant there are a table原创 2017-07-12 13:20:17 · 162 阅读 · 0 评论