随笔分类 - codeforces
摘要:Description The crowdedness of the discotheque would never stop our friends from having fun, but a bit more spaciousness won't hurt, will it? The disc
阅读全文
摘要:Description Nadeko's birthday is approaching! As she decorated the room for the party, a long garland of Dianthus-shaped paper pieces was placed on a
阅读全文
摘要:Description Sengoku still remembers the mysterious "colourful meteoroids" she discovered with Lala-chan when they were little. In particular, one of t
阅读全文
摘要:Description A few years ago, Hitagi encountered a giant crab, who stole the whole of her body weight. Ever since, she tried to avoid contact with othe
阅读全文
摘要:Description You are given positive integer number n. You should create such strictly increasing sequence of k positive numbersa1, a2, ..., ak, that th
阅读全文
摘要:Description You are given the array of integer numbers a0, a1, ..., an - 1. For each element find the distance to the nearest zero (to the element whi
阅读全文
摘要:Description You are given matrix with n rows and n columns filled with zeroes. You should put k ones in it in such a way that the resulting matrix is
阅读全文
摘要:Description Mike has a sequence A = [a1, a2, ..., an] of length n. He considers the sequence B = [b1, b2, ..., bn] beautiful if the gcd of all its ele
阅读全文
摘要:Description Mike has n strings s1, s2, ..., sn each consisting of lowercase English letters. In one move he can choose a string si, erase the first ch
阅读全文
摘要:Description Petya recieved a gift of a string s with length up to 105 characters for his birthday. He took two more empty strings t and u and decided
阅读全文
摘要:Description 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 maxim
阅读全文
摘要:Description Given a positive integer n, find k integers (not necessary distinct) such that all these integers are strictly greater than 1, and their p
阅读全文
摘要:Description Inzane finally found Zane with a lot of money to spare, so they together decided to establish a country of their own. Ruling a country is
阅读全文
摘要:Description Although Inzane successfully found his beloved bone, Zane, his owner, has yet to return. To search for Zane, he would need a lot of money,
阅读全文
摘要:Description Zane the wizard is going to perform a magic show shuffling the cups. There are n cups, numbered from 1 to n, placed along the x-axis on a
阅读全文
摘要:Description Zane the wizard had never loved anyone before, until he fell in love with a girl, whose name remains unknown to us. The girl lives in hous
阅读全文
摘要:Description Bear Limak prepares problems for a programming competition. Of course, it would be unprofessional to mention the sponsor name in the state
阅读全文
摘要:Description A tree is an undirected connected graph without cycles. The distance between two vertices is the number of edges in a simple path between
阅读全文
摘要:Description In the army, it isn't easy to form a group of soldiers that will be effective on the battlefield. The communication is crucial and thus no
阅读全文
摘要:Description Bear Limak examines a social network. Its main functionality is that two members can become friends (then they can talk with each other an
阅读全文