
CodeForces
文章平均质量分 88
Chen_Jr_
某个正在奋斗的ACMer
展开
-
Codeforces 960B(优先队列)
题目链接:点击打开链接题目描述:B. Minimize the errortime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two arrays A and B, each of size n. The error, E...原创 2018-04-11 13:08:26 · 201 阅读 · 0 评论 -
Codeforces 1003D(贪心)
传送门题面:D. Coins and Queriestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp has nn coins, the value of the ii-th coin is aiai. It is guaran...原创 2018-07-09 18:44:40 · 671 阅读 · 0 评论 -
Codeforces 1005C(贪心)
传送门题面:C. Summarize to the Power of Twotime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA sequence a1,a2,…,ana1,a2,…,an is called good if, for each ...原创 2018-07-11 17:40:25 · 438 阅读 · 0 评论 -
Codeforces 1005D(dp)
传送门题面: D. Polycarp and Div 3time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp likes numbers that are divisible by 3...原创 2018-07-11 17:51:00 · 338 阅读 · 0 评论 -
Codeforces 1015D(贪心)
传送门题目描述: 在一条数轴上有编号为1到n的n座房子,每次必须移动,移动的距离为两点坐标之差的绝对值,问能否在k回合里一共移动s距离。题目分析: 我们考虑进行贪心。显然,当我们需要移动的距离s大于k次可以移动的最大值k*(n-1),以及当需要移动的步数小于k次可以移动的最小值k时,显然不符合题意。而显然在其他情况下人必定可以用各种方式成功移动的。 之后我们就...原创 2018-08-03 22:30:24 · 205 阅读 · 0 评论 -
Codeforces 1015 E(模拟)
传送门E1传送门E2题目描述: 给你一张n*m的图,星星的概念是若一个点为‘*’,如果它的上下左右一格,两格.....n格都是‘*’,那么它就是一个星星。题目问你给你的这张图是否能够完全呗星星给覆盖,如果可以,则输出每个星星的中心点和延申的大小,否则输出-1。 E1的数据范围n,m<=100,而E2的数据范围n,m<=1000题目分析: 事实上...原创 2018-08-04 10:01:42 · 290 阅读 · 0 评论 -
Codeforces 1029F(思维)
传送门题面:F. Multicolored Markerstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is an infinite board of square tiles. Ini...原创 2018-08-30 23:29:33 · 389 阅读 · 0 评论 -
Codeforces 1029D(数论+思维)
传送门题面:D. Concatenated Multiplestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array aa, consisting of nn p...原创 2018-08-31 16:12:23 · 897 阅读 · 0 评论 -
Codeforces 1029C(贪心)
传送门题面:C. Maximal Intersectiontime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given nn segments on a number line; eac...原创 2018-08-31 16:46:30 · 467 阅读 · 0 评论 -
Codeforces 1028C(面积并/思维)
传送门题面:C. Rectanglestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given nn rectangles on a plane with coordinates o...原创 2018-08-28 22:33:29 · 599 阅读 · 0 评论 -
Codeforces 1027C(贪心)
传送门题面:C. Minimum Value Rectangletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have nn sticks of the given lengths.Yo...原创 2018-09-04 15:49:22 · 358 阅读 · 0 评论 -
Codeforces 1027D(Tarjan缩点+贪心)
传送门题面:D. Mouse Hunttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMedicine faculty of Berland State University has just fin...原创 2018-09-04 16:09:56 · 314 阅读 · 0 评论 -
Codeforces 1041D(双指针)
传送门题面:D. Glidertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA plane is flying at a constant height of hh meters above the...原创 2018-09-25 10:57:36 · 405 阅读 · 0 评论 -
Codeforces 1066 C(思维)
传送门:题面:C. Books Queriestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have got a shelf and want to put some books on it...原创 2018-11-11 23:43:04 · 294 阅读 · 0 评论 -
Codeforces 1108 E2(线段树+思维)
传送们题意:给你一个长度为nnn的数列b、b、b、以及mmm个区间。你可以选取111个或多个这样的区间aia_iai,使得令区间a_i所对应的所有值b_i都加111。你最终要使得maxi=1nbi−mini=1nbi\max\limits_{i=1}^{n}b_i - \min\limits_{i=1}^{n}b_ii=1maxnbi−i=1minnbi最大。问你方案数以及...原创 2019-02-01 17:58:09 · 418 阅读 · 0 评论 -
Codeforces 1104 E(DFS生成树)
传送门题意:给你一个有nnn个结点,mmm条边的无向连通图,以及一个数字kkk。现在问你,能否构成如下的两种情况:找到111条长度大于nk\frac{n}{k}kn路径,并把这条路径输出找到kkk个环,要求每个环的长度至少要为333,且环的长度不能被333整除。并把这kkk个环的路径都输出出来题目分析在这道题中,我们需要运用到DFS生成树的一些性质。首先,对于DFS生成树,简...原创 2019-02-03 21:09:15 · 720 阅读 · 0 评论 -
Codeforces 1107 F (二分图最大权匹配)
传送门题意:有nnn个贷款,你在月初可以申请任意一个贷款。对于第iii个贷款,你可以获得aia_iai元,但是你要在未来的kik_iki个月底还bib_ibi元。现在每个贷款只能申请一次,问在某个时刻,你能够获得的最多的钱。题目分析:我们思考这样的一个问题,假设我们选取了第iii个贷款,并经过了jjj个月,那么对于选取第iii个贷款这个行为,它对答案的贡献为:max(ai−bi×(...原创 2019-02-10 13:03:57 · 456 阅读 · 0 评论 -
Codeforces 1105E(最大独立集)
传送门题意:现在有两种操作:更改名字iniiniini输入一个名字namenamename,如果namenamename和iniiniini相同,则名字为namenamename的朋友会开心(否则不开心)现在有nnn次这两种操作,问你最多能够使得多少个朋友开心。题目分析:首先我们考虑每一个1…2&nbsp;2&nbsp;2…11\dots 2~2~2\dots 11…2&nbsp...原创 2019-02-10 20:42:12 · 363 阅读 · 0 评论 -
Codeforces 999E(强连通分量缩点)
传送门题面: E. Reachability from the Capitaltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn cities and mm roads in...原创 2018-06-24 09:45:27 · 1630 阅读 · 0 评论 -
Codeforces 988E(贪心+模拟)
传送门题面:E. Divisibility by 25time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an integer nn from 11 to 10181018 without leading zeroes.I...原创 2018-06-02 16:14:08 · 879 阅读 · 2 评论 -
Codeforces 962C(dfs)
题目链接:点击打开链接题目描述:C. Make a Squaretime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a positive integer nn, writ...原创 2018-04-11 13:38:02 · 199 阅读 · 0 评论 -
Codeforces 962D(优先队列)
题目链接:点击打开链接题目描述:D. Merge Equalstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array of positive integers. While there are at lea...原创 2018-04-11 22:16:00 · 520 阅读 · 0 评论 -
Codeforces 964B(贪心)
题目链接:点击打开链接 题目描述:B. Messagestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n incoming messages for Vasya. The i-th message is goi...原创 2018-04-18 13:53:22 · 243 阅读 · 0 评论 -
Codeforces 900B (Java高精度或模拟)
传送门题面:B. Position in Fractiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have a fraction . You need to find the first occurrence of digit c...原创 2018-04-23 13:06:00 · 471 阅读 · 0 评论 -
CF967A(细节模拟)
传送门题面:A. Mind the Gaptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThese days Arkady works as an air traffic controller at a large airport. He co...原创 2018-04-30 12:27:53 · 419 阅读 · 0 评论 -
CF967C(二分+细节)
传送门题面:C. Stairs and Elevatorstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the year of 30XX30XX participants of some...原创 2018-04-30 12:43:42 · 1085 阅读 · 0 评论 -
Codeforces 977D(思维)
传送门题面:D. Divide by three, multiply by twotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp likes to play with numbers. He takes some integer...原创 2018-05-09 13:21:38 · 981 阅读 · 0 评论 -
Codeforces 980B(思维)
传送门题面:B. Marlintime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe city of Fishtopia can be imagined as a grid of 44 rows and an odd number of colu...原创 2018-05-09 21:43:52 · 594 阅读 · 0 评论 -
Codeforces 976E/925C (01Trie树)
传送门题面:C. Big Secrettime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVitya has learned that the answer for The Ultimate Question of Life, the Univer...原创 2018-05-03 14:19:50 · 355 阅读 · 0 评论 -
Codeforces 982D (带权并查集)
传送门题面:D. Sharktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFor long time scientists study the behavior of sharks. Sharks, as many other species,...原创 2018-05-21 14:31:35 · 770 阅读 · 0 评论 -
Codeforces 985C (贪心)
传送门题面: C. Liebig's Barrelstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have m = n·k wooden staves. The i-th stave has length ai. You hav...原创 2018-05-24 14:03:52 · 1030 阅读 · 0 评论 -
Codeforces 985D(二分答案)
传送门题面: D. Sand Fortresstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are going to the beach with the idea to build t...原创 2018-05-24 14:21:16 · 1189 阅读 · 2 评论 -
Codeforces 989C (构造)
传送门题面:C. A Mist of Florescencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs the boat drifts down the river, a wood full of blossoms shows up o...原创 2018-06-12 17:37:23 · 721 阅读 · 0 评论 -
Codeforces 992C(数学)
传送门题面:C. Nastya and a Wardrobetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputNastya received a gift on New Year — a magic wardrobe. It is magic be...原创 2018-06-21 23:36:52 · 514 阅读 · 1 评论 -
Codeforces 990C (思维)
传送门题面: C. Bracket Sequences Concatenation Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA bracket sequence is a string containing only...原创 2018-06-14 14:16:20 · 377 阅读 · 0 评论 -
Codeforces 988C(STL运用)
传送门题面: C. Equal Sumstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given kk sequences of integers. The length of the ii-th sequence eq...原创 2018-06-02 15:23:55 · 596 阅读 · 0 评论 -
Codeforces 988D(STL运用+思维)
传送门题面: D. Points and Powers of Twotime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn distinct points on a coordinate line, the coordi...原创 2018-06-02 15:57:13 · 534 阅读 · 0 评论 -
Codeforces 404D(dp)
传送门题意:111维扫雷问题。给你一个长度为lenlenlen的字符串,每一个字符串分别有五种可能性:111,000,???,222,∗*∗‘,如果字符为111,则代表其相邻有一个∗*∗。如果字符为000,则代表相邻没有∗*∗。如果字符为222,则代表相邻有两个’ ∗*∗ ‘如果字符为∗*∗,则代表此处是地雷如果字符为???,则代表有该字符能够表示为其他四种字符...原创 2019-03-13 22:13:17 · 211 阅读 · 3 评论