随笔分类 -  codeforces

摘要:A. Ehab Fails to Be Thanos 题目链接: 题意: 给你 2n 个数的数组,重新排列,使得前 n 和不等于后 n 项和. 题解: 如果元素都相等,不可能,输出" 1" 否则 sort 后输出 C++ include define P pair define fir first 阅读全文
posted @ 2019-06-05 00:40 _yjun 阅读(298) 评论(0) 推荐(0)
摘要:A. Eating Soup The three friends, Kuro, Shiro, and Katie, met up again! It's time for a party... What the cats do when they unite? Right, they have a 阅读全文
posted @ 2019-05-10 16:27 _yjun 阅读(447) 评论(0) 推荐(0)
摘要:You are given a sequence a1,a2,…,an consisting of n integers. You can choose any non negative integer D (i.e. D≥0), and for each ai you can: add D (on 阅读全文
posted @ 2019-04-18 00:50 _yjun 阅读(482) 评论(0) 推荐(0)
摘要:Polycarp has guessed three positive integers a, b and c. He keeps these numbers in secret, but he writes down four numbers on a board in arbitrary ord 阅读全文
posted @ 2019-04-18 00:35 _yjun 阅读(428) 评论(0) 推荐(0)
摘要:You are a coach at your local university. There are n n students under your supervision, the programming skill of the i i th student is a i ai . You h 阅读全文
posted @ 2019-03-09 22:34 _yjun 阅读(549) 评论(0) 推荐(0)
摘要:International Women's Day is coming soon! Polycarp is preparing for the holiday. There are n n candy boxes in the shop for sale. The i i th box contai 阅读全文
posted @ 2019-03-09 22:17 _yjun 阅读(290) 评论(0) 推荐(0)
摘要:time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Polycarp is going to participate in the conte 阅读全文
posted @ 2019-03-09 21:45 _yjun 阅读(564) 评论(0) 推荐(0)
摘要:time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Reziba has many magic gems. Each magic gem c 阅读全文
posted @ 2019-02-24 20:48 _yjun 阅读(490) 评论(0) 推荐(0)
摘要:题解:这道题可以.用二分来做,好吧,我根本想不到,太强了. 题意是给你起点和终点,还有循环出现的风向.船顺风行驶,走两格;逆风不动;与风成角度,斜着开,船自己不行驶会随风开. 这里的处理方法是:把随风行和船自己行驶分开.用dx[],dy[]计算风向循环节内的随风行的距离;最后对天数进行二分查找,因为 阅读全文
posted @ 2019-02-24 20:36 _yjun 阅读(346) 评论(0) 推荐(0)
摘要:time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output There are n n emotes in very popular digital 阅读全文
posted @ 2019-02-24 20:06 _yjun 阅读(405) 评论(0) 推荐(0)
摘要:time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given array a 1 , a 2 ,…, a n a1,a2,… 阅读全文
posted @ 2019-02-24 19:58 _yjun 阅读(315) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given n segments on a line. There ar 阅读全文
posted @ 2019-02-23 22:05 _yjun 阅读(232) 评论(0) 推荐(0)
摘要:time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a permutation p of length n. Al 阅读全文
posted @ 2019-02-23 21:43 _yjun 阅读(288) 评论(0) 推荐(0)
摘要:time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output A student of z school found a kind of sorting 阅读全文
posted @ 2019-02-23 21:15 _yjun 阅读(334) 评论(0) 推荐(0)
摘要:time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The 9 th grade student Gabriel noticed a cate 阅读全文
posted @ 2019-02-23 21:07 _yjun 阅读(233) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output A group of n cities is connected by a networ 阅读全文
posted @ 2019-02-22 19:29 _yjun 阅读(308) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Cat Noku has obtained a map of the night sky 阅读全文
posted @ 2019-02-22 19:09 _yjun 阅读(261) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Bob has a permutation of integers from 1 to 阅读全文
posted @ 2019-02-22 18:51 _yjun 阅读(353) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Your friend recently gave you some slimes fo 阅读全文
posted @ 2019-02-22 18:28 _yjun 阅读(218) 评论(0) 推荐(0)