随笔分类 - CF
摘要:D. Ehab the Xorcist time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Given 2 integers uu a
阅读全文
摘要:C. Game with Chips time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Petya has a rectangula
阅读全文
摘要:D. Walk on Matrix time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Bob is playing a game
阅读全文
摘要:C. Circle of Monsters time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are playing ano
阅读全文
摘要:The sequence of mm integers is called the permutation if it contains all integers from 11 to mm exactly once. The number mm is called the length of th
阅读全文
摘要: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
阅读全文
摘要:Mike and some bears are playing a game just for fun. Mike is the judge. All bears except Mike are standing in an n × m grid, there's exactly one bear
阅读全文
摘要:Right now she actually isn't. But she will be, if you don't solve this problem. You are given integers n, k, A and B. There is a number x, which is in
阅读全文
摘要:Vasya has a multiset ss consisting of nn integer numbers. Vasya calls some number xx nice if it appears in the multiset exactly once. For example, mul
阅读全文
摘要:The on-board computer on Polycarp's car measured that the car speed at the beginning of some section of the path equals v1 meters per second, and in t
阅读全文
摘要:Tanya wants to go on a journey across the cities of Berland. There are nn cities situated along the main railroad line of Berland, and these cities ar
阅读全文
摘要:This is the easy version of this problem. The only difference is the constraint on kk — the number of gifts in the offer. In this version: k=2k=2. Vas
阅读全文
摘要:Consider a sequence of digits of length 2k2k [a1,a2,…,a2k][a1,a2,…,a2k]. We perform the following operation with it: replace pairs (a2i+1,a2i+2)(a2i+1
阅读全文
摘要:You are given a system of pipes. It consists of two rows, each row consists of nn pipes. The top left pipe has the coordinates (1,1)(1,1) and the bott
阅读全文
摘要:It is the middle of 2018 and Maria Stepanovna, who lives outside Krasnokamensk (a town in Zabaikalsky region), wants to rent three displays to highlig
阅读全文
摘要:Constanze is the smartest girl in her village but she has bad eyesight. One day, she was able to invent an incredible machine! When you pronounce lett
阅读全文
摘要:Little penguin Polo has an n × m matrix, consisting of integers. Let's index the matrix rows from 1 to n from top to bottom and let's index the column
阅读全文
摘要:You have a garland consisting of nn lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is sisi ('R', 'G' and 'B' — colors of
阅读全文
摘要:Finally, a basketball court has been opened in SIS, so Demid has decided to hold a basketball exercise session. 2⋅n2⋅n students have come to Demid's e
阅读全文
摘要:A number is called quasibinary if its decimal representation contains only digits 0 or 1. For example, numbers 0, 1, 101, 110011 — are quasibinary and
阅读全文

浙公网安备 33010602011771号