![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codeforces
文章平均质量分 51
lrccccc
靡不有初 鲜克有终
展开
-
Codeforces 711C Coloring Trees
C. Coloring Trees time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard outputZS the Coder and Chris the Baboon has arrived at Udayland! They wa原创 2016-09-05 00:53:20 · 4276 阅读 · 0 评论 -
Codeforces 815C. Karen and Supermarket 【树形DP】
C. Karen and Supermarkettime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputOn the way home, Karen decided to原创 2017-07-14 15:06:43 · 541 阅读 · 0 评论 -
Codeforces 815B. Karen and Test 【规律】
B. Karen and Testtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputKaren has just arrived at school, and she原创 2017-07-14 17:10:11 · 589 阅读 · 0 评论 -
Codeforces 830A. Office Keys 【dp】
A. Office Keystime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n people and k keys on a straigh原创 2017-07-17 15:24:32 · 655 阅读 · 0 评论 -
Codeforces B. Cards Sorting 【瞎搞】
B. Cards Sortingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasily has a deck of cards consisting of n原创 2017-07-17 15:47:03 · 588 阅读 · 0 评论 -
Codeforces 800C. Vulnerable Kerbals 【DAG图最长路】
C. Vulnerable Kerbalstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an integer m, and a lis原创 2017-07-18 20:02:50 · 483 阅读 · 0 评论 -
Codeforces853B. Jury Meeting
传送门预处理出所有人在第i天之前到达0所需要的最小花费sumT0[] 以及 所有人在第j天后回去所需要的最小花费sumF0[]枚举开会时间i 则ans=min(sumT0[i−1]+sumF0[i+k]ans=min(sumT0[i-1]+sumF0[i+k]#include<stdio.h>#include<bits/stdc++.h>#define ll long long#defin原创 2017-09-15 22:03:56 · 377 阅读 · 0 评论 -
Codeforces862C. Mahmoud and Ehab and the xor 【构造】
传送门不难发现只有n=2,x=0时才输出NO 特判n=1,2时 当n>=3: 令xorSum=1^2^3^….^(n-3) t=x^xorSum 则可以构造出: t!=0:1,2,3,....(n−3),t+(1<<18),(1<<18),0t!=0 : 1,2,3,....(n-3),t+(1<<18),(1<<18),0 t==0:1,2,3,...,(n−2),(1<<18),[原创 2017-09-20 22:42:58 · 389 阅读 · 0 评论 -
Codeforces862 E. Mahmoud and Ehab and the function
传送门sumA=∑ni=1(−1)i−1aisumA=\sum_{i=1}^{n}(-1)^{i-1}a_i sumB[j]=∑ni=1(−1)ibi+jsumB[j]=\sum_{i=1}^{n}(-1)^ib_{i+j} 显然f(j)=|sumA+sumB[j]|f(j)=|sumA+sumB[j]|对每次更新[l,r,x][l,r,x] 显然只有(r−l+1)%2==1时,sumA才会改原创 2017-09-20 22:55:49 · 355 阅读 · 0 评论 -
Codeforces 827B. High Load 【构造】
B. High Loadtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputArkady needs your help again! This time he dec原创 2017-07-12 16:08:21 · 636 阅读 · 0 评论 -
Codeforces 827A. String Reconstruction
A. String Reconstructiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIvan had string s consisting of small English letters. However, his fr原创 2017-07-12 15:56:07 · 558 阅读 · 0 评论 -
Codeforces 586D Phillip and Trains
D. Phillip and Trainstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe mobile application store has a new game called "Subway Roller".The原创 2016-11-19 23:53:00 · 718 阅读 · 0 评论 -
51NOD 1536 不一样的猜数游戏 数论
1536 不一样的猜数游戏题目来源: CodeForces基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 收藏 关注瓦斯亚和皮台亚在玩一个简单的游戏。瓦斯亚心中想一个整数x,它是1到n之间的整数。然后皮台亚尝试着猜这个数字。皮台亚每次问一个形如这样的问题:这个x是y的倍数吗?这个游戏的流程是这样的:首先皮台亚把所有他想问的形如上述的问题都问出来(当然他原创 2017-02-01 21:40:57 · 769 阅读 · 0 评论 -
Codeforces-798D. Mike and distribution
D. Mike and distributiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMike has always been thinking about the harshness of social inequality原创 2017-05-10 21:54:55 · 466 阅读 · 0 评论 -
Codeforces Round #411 (Div. 1) C. Ice cream coloring
C. Ice cream coloringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIsart and Modsart were trying to solve an interesting problem when sudden原创 2017-05-08 22:51:29 · 822 阅读 · 0 评论 -
Codeforces 809A Do you want a date?
A. Do you want a date?time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLeha decided to move to a quiet town Vičkopolis, because he was tired by livi原创 2017-06-01 20:34:01 · 160 阅读 · 0 评论 -
Codeforces 799C. Fountains
C. Fountainstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputArkady plays Gardenscapes a lot. Arkady wants to build two new fountains. There ar原创 2017-06-02 20:18:58 · 707 阅读 · 0 评论 -
Codeforces 799D. Field expansion 【DP】
D. Field expansiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn one of the games Arkady is fond of the game process happens on a rectangul原创 2017-06-02 21:27:29 · 687 阅读 · 0 评论 -
Codeforces 819B. Mister B and PR Shifts
B. Mister B and PR Shiftstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSome time ago Mister B detected a strange signal from the space, whic原创 2017-07-11 19:47:29 · 633 阅读 · 0 评论 -
Codeforces790B. Bear and Tree Jumps 【树型DP】
传送门ans=∑ceiling(disi,jk)ans=\sum{ceiling(\frac{dis_{i,j}}{k})} 令f(x,k)=k−x%k令f(x,k)=k-x\%k 则ans=∑disi,j+f(disi,j,k)k=1k(∑disi,j+∑f(disi,j,k))则ans=\sum{ \frac{ dis_{i,j}+f(dis_{i,j},k) }{k} } = \frac1原创 2017-10-31 15:51:55 · 471 阅读 · 0 评论