![](https://img-blog.csdnimg.cn/2019091813595558.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
贪心
文章平均质量分 92
贪心
_sky123_
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #738 (Div. 2) D2. Mocha and Diana (Hard Version)
题目链接This is the hard version of the problem. The only difference between the two versions is the constraint on nnn. You can make hacks only if all versions of the problem are solved.A forest is an undirected graph without cycles (not necessarily connecte原创 2021-08-16 22:21:05 · 282 阅读 · 0 评论 -
Educational Codeforces Round 111 F. Jumping Around
题目链接There is an infinite pond that can be represented with a number line. There are nnn rocks in the pond, numbered from 111 to nnn. The iii-th rock is located at an integer coordinate aia_iai. The coordinates of the rocks are pairwise distinct. The rock原创 2021-07-28 17:32:04 · 135 阅读 · 0 评论 -
2021牛客暑期多校训练营2 G.League of Legends
题目链接题目描述ZLOIers love playing League of Legends, but they seldom have time to play together.When summer vacation came, each of them scheduled some free time for it, which could be described as an interval [ai,bi)[a_i,b_i)[ai,bi) (minute).Now the n{n}n原创 2021-07-24 23:41:21 · 473 阅读 · 0 评论 -
2020ICPC EC-Final D. City Brain
题目链接Prof. Pang works for the City Brain program of Capital Grancel. The road network of Grancel can be represented by an undirected graph. Initially, the speed limit on each road is 111m/s. Prof. Pang can increase the speed limit on a road by 111m/s with原创 2021-05-14 10:36:22 · 670 阅读 · 6 评论 -
关押罪犯
题目描述S城现有两座监狱,一共关押着N名罪犯,编号分别为1−N。他们之间的关系自然也极不和谐。很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲突。我们用“怨气值”(一个正整数值)来表示某两名罪犯之间的仇恨程度,怨气值越大,则这两名罪犯之间的积怨越多。如果两名怨气值为 c 的罪犯被关押在同一监狱,他们俩之间会发生摩擦,并造成影响力为c的冲突事件。每年年末,警察局会将本年内监狱中的所有冲...原创 2019-12-28 21:13:30 · 170 阅读 · 0 评论 -
2021ICPC昆明 A.AC
题目链接题目描述Crystal’s fortune predict system is successfully developed!The predict system is a distributed system consists of NNN computers. When it receives a predict request, each computer will generate one lowercase letter as its output. The final fortun原创 2021-04-12 00:09:57 · 622 阅读 · 0 评论 -
Educational Codeforces Round 76 (Rated for Div. 2) D. Yet Another Monster Killing Problem
题目链接You play a computer game. In this game, you lead a party of mmm heroes, and you have to clear a dungeon with nnn monsters. Each monster is characterized by its power aia_iai. Each hero is characterized by his power pip_ipi and endurance sis_isi.Th原创 2021-03-12 08:33:53 · 129 阅读 · 0 评论 -
Educational Codeforces Round 82 (Rated for Div. 2) D. Fill The Bag
题目链接You have a bag of size nnn. Also you have mmm boxes. The size of iii-th box is aia_iai, where each aia_iai is an integer non-negative power of two.You can divide boxes into two parts of equal size. Your goal is to fill the bag completely.For examp原创 2021-02-26 23:33:15 · 124 阅读 · 0 评论 -
Educational Codeforces Round 86 (Rated for Div. 2) F. Make It Ascending
题目链接You are given an array aaa consisting of nnn elements. You may apply several operations (possibly zero) to it.During each operation, you choose two indices iii and jjj (1≤i,j≤n1 \le i, j \le n1≤i,j≤n; i≠ji \ne ji=j), increase aja_jaj by aia_iai,原创 2021-02-24 21:22:54 · 180 阅读 · 0 评论 -
Educational Codeforces Round 87 (Rated for Div. 2) F. Summoning Minions
题目链接Polycarp plays a computer game. In this game, the players summon armies of magical minions, which then fight each other.Polycarp can summon nnn different minions. The initial power level of the iii-th minion is aia_iai, and when it is summoned, all原创 2021-02-22 23:33:05 · 172 阅读 · 1 评论 -
Educational Codeforces Round 89 (Rated for Div. 2) E. Two Arrays
题目链接You are given two arrays a1,a2,…,ana_1, a_2, \dots , a_na1,a2,…,an and b1,b2,…,bmb_1, b_2, \dots , b_mb1,b2,…,bm. Array bbb is sorted in ascending order (bi<bi+1b_i < b_{i + 1}bi<bi+1 for each iii from 111 to m−1m - 1m−1).You have to原创 2021-02-21 21:58:56 · 140 阅读 · 0 评论 -
Educational Codeforces Round 96 (Rated for Div. 2) F. Realistic Gameplay
题目链接Recently you’ve discovered a new shooter. They say it has realistic game mechanics.Your character has a gun with magazine size equal to kkk and should exterminate nnn waves of monsters. The iii-th wave consists of aia_iai monsters and happens from t原创 2021-02-14 21:24:10 · 150 阅读 · 0 评论 -
Educational Codeforces Round 27 G. Shortest Path Problem?
题目链接You are given an undirected graph with weighted edges. The length of some path between two vertices is the bitwise xor of weights of all edges belonging to this path (if some edge is traversed more than once, then it is included in bitwise xor the sam原创 2021-02-11 13:31:56 · 140 阅读 · 0 评论 -
2020-2021 ICPC, NERC, Southern and Volga Russian Regional Contest B. Bakery
题目链接Monocarp would like to open a bakery in his local area. But, at first, he should figure out whether he can compete with other shops.Monocarp plans that the bakery will work for nnn days. On the iii-th day, aia_iai loaves of bread will be baked in th原创 2021-02-04 10:57:43 · 415 阅读 · 0 评论 -
Educational Codeforces Round 101 (Rated for Div. 2) F. Power Sockets
// We decided to drop the legend about the power sockets but feel free to come up with your own :^)Define a chain:a chain of length 111 is a single vertex;a chain of length xxx is a chain of length x−1x-1x−1 with a new vertex connected to the end of it原创 2021-01-30 09:31:28 · 159 阅读 · 0 评论 -
2020CCPC秦皇岛 K. Kingdom‘s Power
题目链接Alex is a professional computer game player.These days, Alex is playing a war strategy game. The kingdoms in the world form a rooted tree. Alex’s kingdom 111 is the root of the tree. With his great diplomacy and leadership, his kingdom becomes the gr原创 2020-12-14 23:48:20 · 327 阅读 · 0 评论 -
Codeforces Round #688 (Div. 2) E. Dog Snacks
题目链接 Gildong is playing with his dog, Badugi. They're at a park that has $$$n$$$ intersections and $$$n-1$$$ bidirectional roads, each $$$1$$$ meter in length and connecting two intersections原创 2020-12-05 16:32:11 · 284 阅读 · 0 评论 -
Educational Codeforces Round 99 (Rated for Div. 2) E. Four Points
题目链接You are given four different integer points p1p_1p1, p2p_2p2, p3p_3p3 and p4p_4p4 on XY\mathit{XY}XY grid.In one step you can choose one of the points pip_ipi and move it in one of four directions by one. In other words, if you have chosen point原创 2020-12-02 23:50:38 · 214 阅读 · 0 评论 -
P2387 [NOI2014]魔法森林
题目链接题目描述为了得到书法大家的真传,小 EEE 同学下定决心去拜访住在魔法森林中的隐士。魔法森林可以被看成一个包含 nnn 个节点 mmm 条边的无向图,节点标号为 1,2,3,…,n1,2,3,…,n1,2,3,…,n,边标号为 1,2,3,…,m1,2,3,…,m1,2,3,…,m。初始时小 EEE 同学在 111 号节点,隐士则住在 nnn 号节点。小 EEE 需要通过这一片魔法森林,才能够拜访到隐士。魔法森林中居住了一些妖怪。每当有人经过一条边的时候,这条边上的妖怪 就会对其发起攻击。幸运原创 2020-10-16 14:49:05 · 217 阅读 · 0 评论 -
ZOJ 3732 Graph Reconstruction
题目链接Let there be a simple graph with NNN vertices but we just know the degree of each vertex. Is it possible to reconstruct the graph only by these information?A simple graph is an undirected graph that has no loops (edges connected at both ends to the s原创 2020-10-02 15:15:00 · 1180 阅读 · 0 评论 -
Codeforces Round #669 (Div. 2)E - Egor in the Republic of Dagestan
题目链接Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan.There are nnn cities in the republic, some of them are connected by mmm directed roads without any additional condi原创 2020-09-09 15:37:05 · 176 阅读 · 0 评论 -
2020 Multi-University Training Contest 2 Total Eclipse
题目链接Problem DescriptionThere are nnn cities and m bidirectional roads in Byteland. These cities are labeled by 1,2,…,n1,2,…,n1,2,…,n, the brightness of the iii-th city is bib_ibi.Magician Sunset wants to play a joke on Byteland by making a total eclips原创 2020-08-28 15:05:42 · 174 阅读 · 0 评论 -
Boboniu and Jianghu
Since Boboniu finished building his Jianghu, he has been doing Kungfu on these mountains every day.Boboniu designs a map for his nnn mountains. He uses n−1n−1n−1 roads to connect all nnn mountains. Every pair of mountains is connected via roads.For the i原创 2020-08-16 15:42:29 · 306 阅读 · 4 评论 -
Pairs of Pairs
You have a simple and connected undirected graph consisting of nnn nodes and mmm edges.Consider any way to pair some subset of these nnn nodes such that no node is present in more than one pair.This pairing is valid if for every pair of pairs, the induce原创 2020-08-10 09:49:21 · 537 阅读 · 0 评论 -
Kabaleo Lite
链接:https://ac.nowcoder.com/acm/contest/5673/K来源:牛客网题目描述Tired of boring WFH (work from home), Apollo decided to open a fast food restaurant, called Kabaleo Lite\textbf{Kabaleo Lite}Kabaleo Lite.The restaurant serves nnn kinds of food, numbered原创 2020-08-07 16:05:30 · 279 阅读 · 0 评论 -
Interesting Computer Game
链接:https://ac.nowcoder.com/acm/contest/5673/I来源:牛客网题目描述Apollo is playing an interesting computer game. There are NNN rounds in the game.At each round, the computer will give Apollo two integers (aia_iai and bib_ibi), and Apollo can do exactly one of原创 2020-08-07 11:07:41 · 314 阅读 · 0 评论 -
Mastermind
In the game of Mastermind, there are two players — Alice and Bob. Alice has a secret code, which Bob tries to guess. Here, a code is defined as a sequence of n colors. There are exactly n+1n+1n+1 colors in the entire universe, numbered from 111 to n+1n+1n原创 2020-07-26 18:55:25 · 312 阅读 · 0 评论 -
Postman
A postman delivers letters to his neighbors in a one-dimensional world.The post office, which contains all of the letters to begin with, is located at x=0x = 0x=0, and there aren houses to which the postman needs to deliver the letters. House iii is locat原创 2020-06-20 19:31:38 · 301 阅读 · 0 评论 -
Berland Beauty
There are n railway stations in Berland. They are connected to each other by n−1 railway sections. The railway network is connected, i.e. can be represented as an undirected tree.You have a map of that network, so for each railway section you know which s原创 2020-05-20 15:20:30 · 220 阅读 · 0 评论