
CodeForces
YOONGI
这个作者很懒,什么都没留下…
展开
-
CodeForces - 832B Petya and Exam (模拟)
Petya and ExamIt's hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy to Petya, but he thinks he lacks time to finish them all, so he asks you to help ...原创 2019-04-05 09:32:50 · 222 阅读 · 0 评论 -
CodeForces - 721C Journey (DFS + DP + 记录路径)
JourneyRecently Irina arrived to one of the most famous cities of Berland— the Berlatov city. There arenshowplaces in the city, numbered from1ton, and some of them are connected by one-dire...原创 2019-08-03 16:09:50 · 495 阅读 · 0 评论 -
CodeForces - 585B Phillip and Trains (思维+ BFS)
Phillip and TrainsThe mobile application store has a new game called "Subway Roller".The protagonist of the game Philip is located in one end of the tunnel and wants to get out of the other one...原创 2019-07-31 09:15:36 · 331 阅读 · 0 评论 -
CodeForces - 687A NP-Hard Problem (二分图判断染色法)
NP-Hard ProblemRecently, Pari and Arya did some research about NP-Hard problems and they found theminimum vertex coverproblem very interesting.Suppose the graphGis given. SubsetAof its verti...原创 2019-07-31 10:04:54 · 215 阅读 · 0 评论 -
CodeForces - 437C The Child and Toy (贪心)
The Child and ToyOn Children's Day, the child got a toy from Delayyy as a present. However, the child is so naughty that he can't wait to destroy the toy.The toy consists ofnparts andmropes...原创 2019-07-31 10:36:00 · 405 阅读 · 0 评论 -
CodeForces - 916B Jamie and Binary Sequence (changed after round) (思维+模拟)
Jamie and Binary Sequence (changed after round)Jamie is preparing a Codeforces round. He has got an idea for a problem, but does not know how to solve it. Help him write a solution to the following ...原创 2019-08-05 10:16:43 · 367 阅读 · 1 评论 -
Gym - 100923H Por Costel and the Match (并查集)
Por Costel and the MatchOberyn Martell and Gregor Clegane are dueling in a trial by combat. The fight is extremely important, as the life of Tyrion Lannister is on the line. Oberyn and Gregor are...原创 2019-08-01 10:38:45 · 144 阅读 · 0 评论 -
Gym - 100923B Por Costel and the Algorithm (最短路Dijkstra + 优先队列 +路径记录)
Por Costel and the AlgorithmEven though he isn't a student of computer science, Por Costel the pig has started to study Graph Theory. Today he's learning about Bellman-Ford, an algorithm that cal...原创 2019-08-01 16:35:01 · 231 阅读 · 0 评论 -
CodeForces - 989C A Mist of Florescence (思维构图)
A Mist of FlorescenceAs the boat drifts down the river, a wood full of blossoms shows up on the riverfront."I've been here once," Mino exclaims with delight, "it's breathtakingly amazing.""Wh...原创 2019-08-02 10:54:07 · 252 阅读 · 0 评论 -
CodeForces - 489D Unbearable Controversy of Being (思维+暴力)
Unbearable Controversy of BeingTomash keeps wandering off and getting lost while he is walking along the streets of Berland. It's no surprise! In his home town, for any pair of intersections ther...原创 2019-08-02 11:23:13 · 199 阅读 · 0 评论 -
CodeForces - 598D Igor In the Museum (广搜)
Igor In the MuseumIgor is in the museum and he wants to see as many pictures as possible.Museum can be represented as a rectangular field ofn × mcells. Each cell is either empty or impassable...原创 2019-08-02 11:40:01 · 158 阅读 · 0 评论 -
CodeForces - 500B New Year Permutation (并查集)
New Year PermutationUser ainta has a permutationp1, p2, ..., pn. As the New Year is coming, he wants to make his permutation as pretty as possible.Permutationa1, a2, ..., anisprettierthan ...原创 2019-08-02 14:44:46 · 231 阅读 · 0 评论 -
CodeForces - 940F Machine Learning (带修改莫队+离散化)
Machine LearningYou come home and fell some unpleasant smell. Where is it coming from?You are given an arraya. You have to answer the following queries:You are given two integerslandr. Le...原创 2019-08-10 10:18:22 · 850 阅读 · 0 评论 -
CodeForces - 721D Maxim and Array (贪心思维+模拟)
Maxim and ArrayRecently Maxim has found an array ofnintegers, needed by no one. He immediately come up with idea of changing it: he invented positive integerxand decided to add or subtract it...原创 2019-08-03 11:02:09 · 175 阅读 · 0 评论 -
CodeForces - 350B Resort (DFS)
ResortValera's finally decided to go on holiday! He packed up and headed for a ski resort.Valera's fancied a ski trip but he soon realized that he could get lost in this new place. Somebody gav...原创 2019-08-03 08:59:55 · 256 阅读 · 0 评论 -
CodeForces - 449B Jzzhu and Cities (思维+最短路spfa)
Jzzhu and CitiesJzzhu is the president of country A. There arencities numbered from1tonin his country. City1is the capital of A. Also there aremroads connecting the cities. One can go f...原创 2019-07-30 17:10:43 · 216 阅读 · 0 评论 -
CodeForces - 474A Keyboard (水题)
Keyboard题目链接 :http://codeforces.com/problemset/problem/474/AOur good friend Mole is trying to code a big message. He is typing on an unusual keyboard with characters arranged in following way:...原创 2019-04-02 15:37:45 · 917 阅读 · 0 评论 -
CodeForces - 1051C Vasya and Multisets
Vasya and Multisets万圣节到了,杰哥准备给班级里的同学发糖吃,男生女生各一堆。于是他去腐败街的xx小卖部买糖,他认为糖只要是独一无二的那他就是好糖,他跟老板说他想要买n个不一样的糖,但是老板是个黑心商贩,当杰哥把糖带回去的时候才发现有挺多相同的糖而杰哥是一个公平正直的人,他希望男生女生两堆糖中好糖的数量相同,于是他想找你帮忙来解决他的烦恼。为了简化问题我们将不同的糖用不用...原创 2019-04-02 15:48:02 · 135 阅读 · 0 评论 -
CodeForces - 203B Game on Paper
Game on PaperOne not particularly beautiful evening Valera got very bored. To amuse himself a little bit, he found the following game.He took a checkered white square piece of paper, consisting of...原创 2019-04-02 15:59:21 · 206 阅读 · 0 评论 -
CodeForces - 950C Zebras (模拟)
ZebrasOleg writes down the history of the days he lived. For each day he decides if it was good or bad. Oleg calls a non-empty sequence of days azebra, if it starts with a bad day, ends with a bad...原创 2019-04-08 16:15:36 · 174 阅读 · 0 评论 -
CodeForces - 939E Maximize!(尺取)
Maximize!题目链接:http://codeforces.com/problemset/problem/939/EYou are given a multisetSconsisting of positive integers (initially empty). There are two kind of queries:Add a positive integer to...原创 2019-04-08 21:27:51 · 318 阅读 · 0 评论 -
CodeForces - 405B Domino Effect (模拟)
Domino Effect题目链接:http://codeforces.com/problemset/problem/405/BLittle Chris knows there's no fun in playing dominoes, he thinks it's too random and doesn't require skill. Instead, he decided to p...原创 2019-04-03 10:29:00 · 256 阅读 · 0 评论 -
Codeforces Round #560 (Div. 3) (题解 )
比赛链接:http://codeforces.com/contest/1165A. Remainder题目大意:n x y 给一个长度为n的只包含0,1的数字,要使这个数%10^x==10^y ,至少操作几次,操作有两种:把0变为1,把1变为0思路:把后位变成10^y就行了代码:#include<stdio.h>#include<string.h&g...原创 2019-05-15 15:56:52 · 159 阅读 · 0 评论 -
CodeForces - 875F Royal Questions (基环树)
Royal QuestionsIn a medieval kingdom, the economic crisis is raging. Milk drops fall, Economic indicators are deteriorating every day, money from the treasury disappear. To remedy the situation, ...原创 2019-08-02 16:56:10 · 239 阅读 · 0 评论 -
CodeForces - 939A Love Triangle (暴力水题)
Love TriangleAs you could know there are no male planes nor female planes. However, each plane on Earth likes some other plane. There arenplanes on Earth, numbered from1ton, and the plane wi...原创 2019-08-02 17:04:44 · 418 阅读 · 0 评论 -
CodeForces - 707B Bakery (暴力水题)
BakeryMasha wants to open her own bakery and bake muffins in one of thencities numbered from1ton. There arembidirectional roads, each of whose connects some pair of cities.To bake muffin...原创 2019-08-02 17:17:00 · 321 阅读 · 0 评论 -
CodeForces - 1167C News Distribution (并查集)
News DistributionIn some social network, there arennusers communicating with each other inmmgroups of friends. Let's analyze the process of distributing some news between users.Initially, s...原创 2019-08-02 17:25:51 · 287 阅读 · 0 评论 -
CodeForces - 682C Alyona and the Tree (DFS)
Alyona and the TreeAlyona decided to go on a diet and went to the forest to get some apples. There she unexpectedly found a magic rooted tree with root in the vertex1, every vertex and every edg...原创 2019-07-30 15:26:23 · 269 阅读 · 0 评论 -
CodeForces - 617E XOR and Favorite Number (莫队)
XOR and Favorite NumberBob has a favorite numberkandaiof lengthn. Now he asks you to answermqueries. Each query is given by a pairliandriand asks you to count the number of pairs of in...原创 2019-08-10 11:56:51 · 127 阅读 · 0 评论