
cf
文章平均质量分 81
wxl7777
这个作者很懒,什么都没留下…
展开
-
C. Three displays
outputstandard outputIt is the middle of 2018 and Maria Stepanovna, who lives outside Krasnokamensk (a town in Zabaikalsky region), wants to rent three displays to highlight an important problem.There...原创 2018-05-30 15:49:02 · 434 阅读 · 0 评论 -
D. Ehab and the Expected XOR Problem
outputstandard outputGiven two integersnnandxx, construct an array that satisfies the following conditions:for any elementaiaiin the array,1≤ai<2n1≤ai<2n; there is nonon-emptysubs...原创 2019-06-06 22:47:00 · 286 阅读 · 0 评论 -
D. Mysterious Present
Peter decided to wish happy birthday to his friend from Australia and send him a card. To make his present more mysterious, he decided to make achain. Chain here is such a sequence of envelopesA = {...原创 2019-06-13 17:12:58 · 606 阅读 · 0 评论 -
C. Bear and Prime Numbers
Recently, the bear started studying data structures and faced the following problem.You are given a sequence of integersx1, x2, ..., xnof lengthnandmqueries, each of them is characterized by t...原创 2019-06-13 21:14:18 · 338 阅读 · 0 评论 -
C. Vanya and Scales
Vanya has a scales for weighing loads and weights of massesw0, w1, w2, ..., w100grams wherewis some integer not less than2(exactly one weight of each nominal value). Vanya wonders whether he can ...原创 2019-06-09 21:50:15 · 297 阅读 · 0 评论 -
A. Mafia
One daynfriends gathered together to play "Mafia". During each round of the game some player must be the supervisor and othern - 1people take part in the game. For each person we know in how many r...原创 2019-06-15 21:54:00 · 242 阅读 · 0 评论 -
A. Primes or Palindromes?
题目链接:http://codeforces.com/problemset/problem/568/ARikhail Mubinchik believes that the current definition of prime numbers is obsolete as they are too complex and unpredictable. A palindromic number...原创 2019-06-15 22:01:55 · 218 阅读 · 0 评论 -
B. Bear and Blocks
One day, little Vasya found himself in a maze consisting of(n + 1)rooms, numbered from1to(n + 1). Initially, Vasya is at the first room and to get out of the maze, he needs to get to the(n + 1)-...原创 2019-06-10 22:30:43 · 170 阅读 · 0 评论 -
C. Barcode
You've got ann × mpixel picture. Each pixel can be white or black. Your task is to change the colors of as few pixels as possible to obtain a barcode picture.A picture is a barcode if the followin...原创 2019-06-11 11:35:32 · 430 阅读 · 0 评论 -
D. Distance in Tree
Atreeis a connected graph that doesn't contain any cycles.Thedistancebetween two vertices of a tree is the length (in edges) of the shortest path between these vertices.You are given a tree wi...原创 2019-06-11 21:19:52 · 259 阅读 · 0 评论 -
E. Lunar New Year and Red Envelopes
题目链接:http://codeforces.com/problemset/problem/1106/ELunar New Year is approaching, and Bob is going to receive some red envelopes with countless money!But collecting money from red envelopes is a t...原创 2019-06-21 16:06:11 · 483 阅读 · 0 评论 -
B. Nauuo and Circle
题目链接:http://codeforces.com/problemset/problem/1172/BNauuo is a girl who loves drawing circles.One day she has drawn a circle and wanted to draw a tree on it.The tree is a connected undirected gr...原创 2019-06-17 21:57:04 · 450 阅读 · 0 评论 -
B. Working out
Summer is coming! It's time for Iahub and Iahubina to work out, as they both want to look hot at the beach. The gym where they go is a matrixawithnlines andmcolumns. Let numbera[i][j]represent...原创 2019-06-12 21:01:37 · 311 阅读 · 1 评论 -
D. Bubble Sort Graph
Iahub recently has learned Bubble Sort, an algorithm that is used to sort a permutation withnelementsa1,a2, ...,anin ascending order. He is bored of this so simple algorithm, so he invents his o...原创 2019-05-31 22:05:44 · 301 阅读 · 0 评论 -
Codeforces Round #523 (Div. 2) C. Multiplicity
outputstandard outputYou are given an integer array a1,a2,…,ana1,a2,…,an.The array bb is called to be a subsequence of aa if it is possible to remove some elements from aa to get bb.Array b1,b...原创 2018-11-25 18:53:45 · 280 阅读 · 0 评论 -
Codeforces Round #523 (Div. 2) D. TV Shows
outputstandard outputThere are nn TV shows you want to watch. Suppose the whole time is split into equal parts called "minutes". The ii-th of the shows is going from lili-th to riri-th minute, bot...原创 2018-11-25 19:06:32 · 286 阅读 · 0 评论 -
B. Approximating a Constant Range
When Xellos was doing a practice course in university, he once had to measure the intensity of an effect that slowly approached equilibrium. A good way to determine the equilibrium intensity would be ...原创 2019-01-17 21:27:09 · 271 阅读 · 0 评论 -
Educational Codeforces Round 19 B. Odd sum
You are given sequence a1, a2, ..., an of integer numbers of length n. Your task is to find such subsequence that its sum is odd and maximum among all such subsequences. It's guaranteed that given seq...原创 2019-01-18 22:50:02 · 156 阅读 · 0 评论 -
Codeforces Round #116 (Div. 2, C. Letter
Patrick has just finished writing a message to his sweetheart Stacey when he noticed that the message didn't look fancy. Patrick was nervous while writing the message, so some of the letters there wer...原创 2019-01-19 22:35:30 · 264 阅读 · 0 评论 -
Codeforces Round #209 B. Permutation
A permutation p is an ordered group of numbers p1, p2, ..., pn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1, p2, ...原创 2019-01-19 22:49:36 · 188 阅读 · 0 评论 -
Codeforces Global Round 1 D. Jongmah
You are playing a game of Jongmah. You don't need to know the rules to solve this problem. You have nntiles in your hand. Each tile has an integer between 11 and mm written on it.To win the game, yo...原创 2019-02-10 20:52:28 · 488 阅读 · 0 评论 -
Codeforces Round #547 (Div. 3) C D E
C. Polycarp Restores Permutationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAn array of integersp1,p2,…,pnp1,p2,…,pnis cal...原创 2019-03-31 18:34:05 · 217 阅读 · 0 评论 -
E. Median String
You are given two stringsssandtt, both consisting of exactlykklowercase Latin letters,ssis lexicographically less thantt.Let's consider list of all strings consisting of exactlykklowercase...原创 2019-04-07 18:17:55 · 429 阅读 · 4 评论 -
A. The Beatles
Recently a Golden Circle of Beetlovers was found in Byteland. It is a circle route going throughn⋅kcities. The cities are numerated from11ton⋅kn⋅k, the distance between the neighboring cities is e...原创 2019-04-07 18:36:05 · 7449 阅读 · 0 评论 -
E. Superhero Battle
A superhero fights with a monster. The battle consists of rounds, each of which lasts exactlynnminutes. After a round ends, the next round starts immediately. This is repeated over and over again....原创 2019-04-07 18:45:24 · 289 阅读 · 0 评论 -
E. XOR and Favorite Number
Bob 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 integersiandj, such thatl ...原创 2019-06-25 21:52:56 · 360 阅读 · 0 评论