
codeforces
codeforces
czhunian
这个作者很懒,什么都没留下…
展开
-
cf #453(div2) C
题目链接:http://codeforces.com/contest/902/problem/C题意:给定一颗树的高度h, 在给定h+1个数字, 代表每一层上面的节点数, 问是否只存在唯一树满足这序列, 是输出perfect , 否输出ambiguous,并任意给出两组满足这个序列的树的形态(该点的父亲节点序列)。(不一定是二叉树)从第二开始,只要连续出现两层的节点数超过2的就不会存在一个...原创 2019-05-07 11:04:59 · 234 阅读 · 0 评论 -
cf #453(div2) A
题目链接:http://codeforces.com/contest/902/problem/A题意:给n段区间,给定一个长度为m的区间,问n段区间是否能覆盖长度为m的区间。水题,先排序(按左边优先非递减排序),然后遍历区间过去看,是否有长度为m的区间。#include<cstdio>#include<iostream>#include<algorit...原创 2019-05-07 10:50:04 · 127 阅读 · 0 评论 -
cf #453(div2) B
题目链接:http://codeforces.com/contest/902/problem/B题意:给你一颗树进行染色,根节点为1。每个节点要求染成颜色xi,它的所有后代都被染成这个颜色,需要几布操作。#include<iostream>#include<cstdio>#include<algorithm>using namespace std...原创 2019-05-07 10:45:09 · 107 阅读 · 0 评论 -
cf #452(div2) D
D. Shovel Saletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n shovels in Polycarp's shop. The i-th shovel costs i bur...原创 2018-08-16 15:19:28 · 153 阅读 · 0 评论 -
cf #452(div2) C
C. Dividing the numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya has n integers: 1, 2, 3, ..., n. He wants to split t...原创 2018-08-16 15:17:52 · 175 阅读 · 0 评论 -
cf #452(div2) B
B. Months and Yearstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputEverybody in Russia uses Gregorian calendar. In this calendar ...原创 2018-08-16 15:16:45 · 177 阅读 · 0 评论 -
cf #451(div2) D
D. Alarm Clocktime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEvery evening Vitalya sets n alarm clocks to wake up tomorrow. Eve...原创 2018-08-16 15:15:36 · 129 阅读 · 0 评论 -
cf #451(div2) B
B. Proper Nutritiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has n burles. One bottle of Ber-Cola costs a burles and ...原创 2018-08-16 15:05:05 · 181 阅读 · 0 评论 -
cf #451(div2) A
A. Roundingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has a non-negative integer n. He wants to round it to nearest in...原创 2018-08-05 11:25:02 · 127 阅读 · 0 评论 -
cf round 34(div2) B
B. The Modcrabtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVova is again playing some computer game, now an RPG. In the game V...原创 2018-08-05 11:20:15 · 194 阅读 · 0 评论 -
cf #446(div2) D
D. Gluttonytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a with n distinct integers. Construct an array...原创 2018-08-05 11:17:11 · 159 阅读 · 0 评论 -
cf #446(div2) C
C. Pridetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have an array a with length n, you can perform operations. Each oper...原创 2018-08-05 11:16:19 · 323 阅读 · 0 评论 -
cf #446(div2) B
B. Wrathtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHands that shed innocent blood!There are n guilty people in a line, th...原创 2018-08-05 11:15:08 · 178 阅读 · 0 评论 -
cf #446(div2) A
A. Greedtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputJafar has n cans of cola. Each can is described by two integers: remaini...原创 2018-08-02 12:19:09 · 199 阅读 · 0 评论 -
cf #445(div2) C
C. Petya and Catacombstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA very brave explorer Petya once decided to explore Paris c...原创 2018-08-02 12:14:52 · 148 阅读 · 0 评论 -
cf #445(div2) B
B. Vlad and Cafestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVlad likes to eat in cafes very much. During his life, he has v...原创 2018-08-02 12:14:03 · 144 阅读 · 0 评论 -
cf #445(div2)A
A. ACM ICPCtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn a small but very proud high school it was decided to win ACM ICPC....原创 2018-08-02 12:13:15 · 146 阅读 · 0 评论 -
cf 444 (Div. 2)C
C. Solution for Cubetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDuring the breaks between competitions, top-model Izabella t...原创 2018-08-02 12:08:02 · 216 阅读 · 0 评论