## 268D [confirmed] [('1e9+9', 'confirmed', 'ngle line print the remainder after dividing the number of designs by 1000000009 (109 + 9).')]
   OUT: In a single line print the remainder after dividing the number of designs by 1000000009 (109 + 9).
## 2035D [confirmed] [('1e9+7', 'confirmed', 'output n integers representing the answer for each prefix of a modulo 10^9+7 .')]
   OUT: For each test case, output n integers representing the answer for each prefix of a modulo 10^9+7 .
## 70A [confirmed] [('1e6+3', 'confirmed', 'number of empty cells in the box. The answer should be printed modulo 106 + 3.')]
   OUT: Print the single number, equal to the number of empty cells in the box. The answer should be printed modulo 106 + 3.
## 1874F [confirmed] [('1e9+7', 'confirmed', 'number of different permutations that satisfy the conditions, modulo 10^9+7 .')]
   OUT: Output the number of different permutations that satisfy the conditions, modulo 10^9+7 .
## 1209F [confirmed] [('1e9+7', 'confirmed', 'ion i+1 . Since this number may be large, output its remainder modulo 10^9+7 .')]
   OUT: Print n - 1 integers, the answer for every city except for the first city. The i -th integer should be equal to the smallest number he could have written for destination i+1 . Since this number may be large, output its remainder m
## 319A [confirmed] [('1e9+7', 'confirmed', 'Print the complexity of the given dance assignent modulo 1000000007 (109 + 7).')]
   OUT: Print the complexity of the given dance assignent modulo 1000000007 (109 + 7).
## 222E [confirmed] [('1e9+7', 'confirmed', 'Print a single integer — the sought number modulo 1000000007 (109 + 7).')]
   OUT: Print a single integer — the sought number modulo 1000000007 (109 + 7).
## 1954D [confirmed] [('998244353', 'confirmed', 'e integer — the sum of values of all 2^n sets of colors, taken modulo 998244353 .')]
   OUT: Print a single integer — the sum of values of all 2^n sets of colors, taken modulo 998244353 .
## 1886D [confirmed] [('998244353', 'confirmed', 'ts the string s . Since the answers might be large, print them modulo 998244353 .')]
   OUT: Both before processing the queries and after each query, print one integer — the number of ways to order the integers 1, 2, 3, \dots, n such that, if Monocarp inserts the integers into the set in that order, he gets the string s .
## 1717E [confirmed] [('1e9+7', 'confirmed', 'd(a, b))} . Since the answer can be very large, then output it modulo 10^9 + 7 .')]
   OUT: Print exactly one interger — \sum{\operatorname{lcm}(c, \gcd(a, b))} . Since the answer can be very large, then output it modulo 10^9 + 7 .
## 992C [confirmed] [('1e9+7', 'confirmed', 'the expected number of dresses Nastya will own one year later modulo 109 + 7.')]
   OUT: In the only line print a single integer — the expected number of dresses Nastya will own one year later modulo 109 + 7.
## 568B [confirmed] [('1e9+7', 'confirmed', 'In a single line print the answer to the problem modulo 109 + 7.')]
   OUT: In a single line print the answer to the problem modulo 109 + 7.
## 256D [confirmed] [('777777777', 'confirmed', 'Print a single integer — the answer to the problem modulo 777777777.')]
   OUT: Print a single integer — the answer to the problem modulo 777777777.
## 1326C [confirmed] [('998244353', 'confirmed', 'ch the partition value is equal to the maximum possible value, modulo 998244353 . Please note that you should only find the second value modulo 9982')]
   OUT: Print two integers — the maximum possible partition value over all partitions of the permutation into k disjoint segments and the number of such partitions for which the partition value is equal to the maximum possible value, modu
## 2034F1 [confirmed] [('998244353', 'confirmed', "expected value of Khayyam's satchel at the end of the process, modulo 998244353 .")]
   OUT: For each test case, print a single integer: the expected value of Khayyam's satchel at the end of the process, modulo 998244353 .
## 1824B2 [confirmed] [('1e9+7', 'confirmed', 'Print a single integer — the expect number of the good islands modulo 10^9 + 7 . Formally, let M = 10^9 + 7 . It can be shown that the answer can b')]
   OUT: Print a single integer — the expect number of the good islands modulo 10^9 + 7 . Formally, let M = 10^9 + 7 . It can be shown that the answer can be expressed as an irreducible fraction \frac{p}{q} , where p and q are integers and
## 1737E [confirmed] [('1e9+7', 'confirmed', 'denotes the survival probability of the i -th ant in the line modulo 10^9 + 7 .')]
   OUT: For each test, print n lines. i -th line contains a single number that denotes the survival probability of the i -th ant in the line modulo 10^9 + 7 .
## 1336E2 [confirmed] [('998244353', 'confirmed', 'm — p_i is equal to the number of picking ways with value i by modulo 998244353 .')]
   OUT: Print m+1 integers p_0, p_1, \ldots, p_m — p_i is equal to the number of picking ways with value i by modulo 998244353 .
## 1594E2 [confirmed] [('1e9+7', 'confirmed', 'Print one integer — the number of the different colorings modulo 10^9+7 .')]
   OUT: Print one integer — the number of the different colorings modulo 10^9+7 .
## 594D [confirmed] [('1e9+7', 'confirmed', 's — the value of the Euler function for each query, calculated modulo 109 + 7.')]
   OUT: Print q numbers — the value of the Euler function for each query, calculated modulo 109 + 7.
## 1667E [confirmed] [('998244353', 'confirmed', 'le line, the i -th integer is the answer for the i -th vertex (modulo 998244353 ).')]
   OUT: Print n integers in a single line, the i -th integer is the answer for the i -th vertex (modulo 998244353 ).
## 1111E [confirmed] [('1e9+7', 'confirmed', 'indirect) of the other. You need to output the number of ways modulo 10^9+7 for every query.')]
   OUT: Print q lines, where the i -th line contains the answer to the i -th query.
## 1739C [confirmed] [('998244353', 'confirmed', 'me ends in a draw. Since the answers can be large, print them modulo 998244353 .')]
   OUT: For each test case, print three integers: - the number of ways to distribute the cards so that Alex wins; - the number of ways to distribute the cards so that Boris wins; - the number of ways to distribute the cards so that the ga
## 1396D [confirmed] [('1e9+7', 'confirmed', "the number of rectangles satisfying Shrimpy Duc's conditions, modulo 10^9 + 7 .")]
   OUT: Output a single integer — the number of rectangles satisfying Shrimpy Duc's conditions, modulo 10^9 + 7 .
## 986E [confirmed] [('1e9+7', 'confirmed', 'es in the order they are given in the input. Print each answer modulo 10^9+7 = 1000000007 . Print each number on a separate line.')]
   OUT: Print q numbers — the answers to the queries in the order they are given in the input. Print each answer modulo 10^9+7 = 1000000007 . Print each number on a separate line.
## 380D [confirmed] [('1e9+7', 'confirmed', 'a single line print the remainder after dividing the answer by number 1000000007 (109 + 7).')]
   OUT: In a single line print the remainder after dividing the answer by number 1000000007 (109 + 7).
## 1770E [confirmed] [('998244353', 'confirmed', "Output a single integer — the expected value of Koxia's score, modulo 998244353 .")]
   OUT: Output a single integer — the expected value of Koxia's score, modulo 998244353 .
## 1914G2 [confirmed] [('998244353', 'confirmed', 'itially turn on; - the number of sets S of minimum size (taken modulo 998244353 ).')]
   OUT: For each test case, output two integers: - the minimum size of the set S that you initially turn on; - the number of sets S of minimum size (taken modulo 998244353 ).
## 251E [confirmed] [('1e9+7', 'confirmed', 'r — the required number of ways to place the tree on the table modulo 1000000007 (109 + 7).')]
   OUT: Print a single integer — the required number of ways to place the tree on the table modulo 1000000007 (109 + 7).
## 1823F [confirmed] [('998244353', 'confirmed', 'Print n numbers: expected values of c(v) modulo 998244353 for each v from 1 to n . Formally, let M = 998244353 . It can be sho')]
   OUT: Print n numbers: expected values of c(v) modulo 998244353 for each v from 1 to n . Formally, let M = 998244353 . It can be shown that the answer can be expressed as an irreducible fraction \frac{p}{q} , where p and q are integers 
## 1178F2 [confirmed] [('998244353', 'confirmed', 'e integer — the number of ways Alice can perform the painting, modulo 998244353 .')]
   OUT: Output a single integer — the number of ways Alice can perform the painting, modulo 998244353 .
## 2034F2 [confirmed] [('998244353', 'confirmed', "expected value of Khayyam's satchel at the end of the process, modulo 998244353 .")]
   OUT: For each test case, print a single integer: the expected value of Khayyam's satchel at the end of the process, modulo 998244353 .
## 1795D [confirmed] [('998244353', 'confirmed', 'number of valid colorings with maximum possible weight, taken modulo 998244353 .')]
   OUT: Print one integer — the number of valid colorings with maximum possible weight, taken modulo 998244353 .
## 314E [confirmed] [('2^32', 'confirmed', 'In a single line print the answer to the problem modulo 4294967296. If there is no way to return the removed letters, print number 0. P')]
   OUT: In a single line print the answer to the problem modulo 4294967296. If there is no way to return the removed letters, print number 0. Please, do not write the %lld specifier to read or write 64-bit integers in С++. It is preferred
## 575H [confirmed] [('1e9+7', 'confirmed', 'ut should contain a single integer – number of possible states modulo 109 + 7.')]
   OUT: Output should contain a single integer – number of possible states modulo 109 + 7.
## 1758E [confirmed] [('1e9+7', 'confirmed', 'hat the grid is solvable. The answer can be huge, so output it modulo 10^9 + 7 .')]
   OUT: For each test case, output the number of ways to assign clocks in the empty cells so that the grid is solvable. The answer can be huge, so output it modulo 10^9 + 7 .
## 954H [confirmed] [('1e9+7', 'confirmed', '2n - 2 numbers. The k-th of these numbers must be equal to fk modulo 109 + 7.')]
   OUT: Print 2n - 2 numbers. The k-th of these numbers must be equal to fk modulo 109 + 7.
## 1748E [confirmed] [('1e9+7', 'confirmed', 'er of arrays b that satisfy the conditions from the statement, modulo 10^9+7 .')]
   OUT: For each test case print one integer — the number of arrays b that satisfy the conditions from the statement, modulo 10^9+7 .
## 1093F [confirmed] [('998244353', 'confirmed', 've) so the array is good. The answer may be large, so print it modulo 998244353 .')]
   OUT: Print one integer — the number of ways to replace each -1 with some number from 1 to k (inclusive) so the array is good. The answer may be large, so print it modulo 998244353 .
## 1805F2 [confirmed] [('1e9+7', 'confirmed', 'Output a single number — the answer modulo 10^9 + 7 .')]
   OUT: Output a single number — the answer modulo 10^9 + 7 .
## 1295A [uncertain] [('998244353', 'uncertain', 'You have a large electronic screen which can display up to 998244353 decimal digits. The digits are displayed in the same way as on differ')]
   OUT: For each test case, print the greatest integer that can be displayed by turning on no more than n segments of the screen. Note that the answer may not fit in the standard 32 -bit or 64 -bit integral data type.
## 1933D [uncertain] [('1e3', 'uncertain', 'ght. That is, x mod y mod z = (x mod y) mod z . For example, 2024 mod 1000 mod 8 = (2024 mod 1000) mod 8 = 24 mod 8 = 0 .')]
   OUT: For each test case, output "YES" if it is possible, "NO" otherwise. You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.
## 991F [uncertain] [('1e9+7', 'uncertain', '0000 you could write 10^6 , instead of 1000000000 — 10^9 , instead of 1000000007 — 10^9+7 . Vasya decided that, to be concise, the notation should fo')]
   OUT: Output a concise notation of the number n . If there are several concise notations, output any of them.
## 1096A [uncertain] [('998244353', 'uncertain', 'of the next T lines contains two integers l and r ( 1 \\le l \\le r \\le 998244353 ) — inclusive borders of the range. It is guaranteed that testset on')]
   OUT: Print T lines, each line should contain the answer — two integers x and y such that l \le x, y \le r , x \ne y and x divides y . The answer in the i -th line should correspond to the i -th query from the input. If there are multip
## 1192B [uncertain] [('2000', 'uncertain', "second query is d'_2 = (1 + 2030) mod 3 = 0 e'_2 = (1020 + 2030) mod 2000 = 1050 Hence the weight of the edge \\{1, 2\\} is changed to 1050 . Thi")]
   OUT: Output q lines. For each i , line i should contain the diameter of the tree after the i -th update.
## 1560F2 [uncertain] [('998244353', 'uncertain', '50 , 777 and 21 are k -beautiful whereas the numbers 120 , 445435 and 998244353 are not.')]
   OUT: For each test case output on a separate line x — the minimum k -beautiful integer such that x \ge n .
## 1165A [uncertain] [('1e5', 'uncertain', '010100100 after performing one operation. It has remainder 100 modulo 100000 . In the second example the number will be 11010100010 after perform')]
   OUT: Print one integer — the minimum number of operations you should perform to obtain the number having remainder 10^y modulo 10^x . In other words, the obtained number should have remainder 10^y when divided by 10^x .
## 1096C [uncertain] [('998244353', 'uncertain', 'For each query print single integer n ( 3 \\le n \\le 998244353 ) — minimal possible number of vertices in the regular n -gon or -1 i')]
   OUT: For each query print single integer n ( 3 \le n \le 998244353 ) — minimal possible number of vertices in the regular n -gon or -1 if there is no such n .
## 1096D [uncertain] [('998244353', 'uncertain', 'e third line contains n integers a_1, a_2, \\dots, a_n ( 1 \\le a_i \\le 998244353 ).')]
   OUT: Print minimum possible ambiguity of the statement after Vasya deletes some (possibly zero) characters so the resulting statement is easy.
## 1614E [uncertain] [('1e9+1', 'uncertain', "ally. Divan's actual queries are given by x_i = (x'_i + lastans) mod (10^9 + 1) , where a mod b is the reminder when a is divided by b . After answe")]
   OUT: For each query, output a single integer — the temperature in the house after day i .
## 1355F [uncertain] [('998244353', 'uncertain', "Taylor Swift fan. Let's look at the example. In the first game X = 998244353 is hidden. Would be hard to guess this, right? This number is prime,")]
   OUT: 
## 1599F [uncertain] [('1e9+7', 'uncertain', 'lly built a colony on Mars thanks to the work of Elon Tusk. There are 10^9+7 cities arranged in a circle in this colony and none of them are conne')]
   OUT: The output contains Q lines. If it is possible to connect all the cities from the i-th query can be connected with roads of length D_{i} the i-th line should contain the word "Yes", otherwise it should contain the word "No".
## 792F [uncertain] [('1e6+1', 'uncertain', 'ese). - If ki = 1, then character learns spell with x = (ai + j) mod 106 + 1, y = (bi + j) mod 106 + 1. - If ki = 2, then you have to determine if')]
   OUT: For every query of second type print YES if Vova is able to win the fight with corresponding monster and NO otherwise.
## 1560F1 [uncertain] [('998244353', 'uncertain', '50 , 777 and 21 are k -beautiful whereas the numbers 120 , 445435 and 998244353 are not.')]
   OUT: For each test case output on a separate line x — the minimum k -beautiful integer such that x \ge n .
## 1844C [uncertain] [('998244353', 'uncertain', 'is to use the device on the 4 th particle to transform the line into [998244353,998244353,1996488706] , then on the 2 nd particle to transform the li')]
   OUT: For each test case, output one integer, the maximum charge of the remaining particle.
## 40E [variable] 
   OUT: Print the number of different tables that could conform to the preserved data modulo p.
## 1826B [variable] 
   OUT: For each test case output the biggest x , such that f(a, x) is a palindrome. If x can be infinitely large, output 0 instead.
## 117D [variable] 
   OUT: Print m lines each containing an integer — remainder modulo mod of the query result.
## 1374A [variable] 
   OUT: For each test case, print the answer — maximum non-negative integer k such that 0 \le k \le n and k mod x = y . It is guaranteed that the answer always exists.
## 1613B [variable] 
   OUT: The answer for each testcase should contain \lfloor \frac n 2 \rfloor different pairs of integers x and y such that x \neq y , x and y appear in a and x mod y doesn't appear in a . Print the pairs one after another. You can print 
## 1237G [variable] 
   OUT: Output the minimum number of meetings m ( m \ge 0 ), followed by m descriptions of meetings in chronological order. The i -th description must consist of an integer s_i ( 0 \le s_i < n ), followed by k non-negative integers b_{i, 
## 1704H1 [variable] 
   OUT: Output a single integer — the number of different pairs of sequences for n=k modulo M .
## 2001E1 [variable] 
   OUT: For each test case, output a single line containing an integer: the number of different deterministic max-heaps produced by applying the aforementioned operation \mathrm{add} exactly k times, modulo p .
## 1085B [variable] 
   OUT: Print a single integer x — the smallest positive integer solution to (x \mathrm{div} k) * (x mod k) = n . It is guaranteed that this equation has at least one positive integer solution.
## 1656D [variable] 
   OUT: For each test case, print a line with a value of k such that n is k -good ( k \geq 2 ), or -1 if n is not k -good for any k . If there are multiple valid values of k , you can print any of them.
## 888E [variable] 
   OUT: Print the maximum possible value of \sum_{i=1}^k a_{b_i} mod m .
## 958C1 [variable] 
   OUT: Output the number S as described in the problem statement.
## 2018F2 [variable] 
   OUT: For each test case, output n+1 integers: the i -th integer should be the number of arrays that satisfy the conditions for k = i-1 .
## 995E [variable] [('1e9+9', 'uncertain', 'tains 3 positive integers: u, v, p ( 0 \\le u, v \\le p-1 , 3 \\le p \\le 10^9 + 9 ). p is guaranteed to be prime.')]
   OUT: On the first line, print a single integer \ell , the number of button presses. On the second line, print integers c_1, \dots, c_\ell , the button presses. For 1 \le i \le \ell , 1 \le c_i \le 3 . We can show that the answer always
## 130D [variable] 
   OUT: Output ab mod c.
## 81A [none] 
   OUT: Print the given string after it is processed. It is guaranteed that the result will contain at least one character.
## 251C [none] 
   OUT: Print a single integer — the required minimum number of seconds needed to transform number a into number b.
## 822A [none] 
   OUT: Print a single integer denoting the greatest common divisor of integers A! and B!.
## 159A [none] 
   OUT: In the first line print integer k — the number of pairs of friends. In the next k lines print pairs of friends as "Ai Bi" (without the quotes). You can print users in pairs and the pairs themselves in any order. Each pair must be 
## 1748F [none] 
   OUT: On the first line print one integer k ( 0 \le k \le 250000 ) — the number of operations performed. On the second line print k integers i_1,i_2,\ldots,i_k ( 0 \le i_j \lt n ). Here, i_j should be the integer selected on the j -th o
## 1191A [none] 
   OUT: Print an integer a ( 0 \leq a \leq 2 ) and an uppercase letter b ( b \in \lbrace A, B, C, D \rbrace ), representing that the best way is to increase her HP by a , and then the category becomes b . Note that the output characters a
## 1278A [none] 
   OUT: For each test case print the answer to it — "YES" if the given hash h could be obtained from the given password p or "NO" otherwise.
## 45B [none] 
   OUT: Print m lines containing one number each. The i-th line should contain resi — for what number of students the first news they've learned over the m days in question, was the news number i. The number of the news is the number of t
## 628F [none] 
   OUT: Print ''fair" if there exists at least one set that has all the required properties and matches all the given hints. Otherwise, print ''unfair".
## 842D [none] 
   OUT: For each query print the answer on a separate line.
## 772C [none] 
   OUT: On the first line, print the number k, denoting the length of your sequence. On the second line, print k space separated integers, denoting your sequence.
## 2006B [none] 
   OUT: For each test case, output one line containing n-1 integers, each representing the answer after each event.
## 1881D [none] 
   OUT: For each test case, output a single line: - "YES" if it is possible to make all elements in the array equal by applying the operation a certain (possibly zero) number of times; - "NO" otherwise. You can output the answer in any ca
## 1660E [none] 
   OUT: For each test case, output the minimum number of burles you would have to pay to make the A matrix unitary. In other words, print the minimum number of xor-operations it will take after applying cyclic shifts to the matrix for the
## 501D [none] 
   OUT: Print n distinct integers from 0 to n - 1, forming the sum of the given permutations. Separate the numbers by spaces.
## 734D [none] 
   OUT: The only line of the output should contains "YES" (without quotes) if the white king is in check and "NO" (without quotes) otherwise.
## 286B [none] 
   OUT: Print n distinct space-separated integers from 1 to n — a beautiful permutation of size n.
## 804A [none] 
   OUT: Print single integer: the minimum cost of tickets needed to visit all schools.
## 483B [none] 
   OUT: Print a single integer — the answer to the problem.
## 1462E1 [none] 
   OUT: Output t answers to the given test cases. Each answer is the required number of triples of elements, such that the maximum value in the triple differs from the minimum by no more than 2 . Note that in difference to the hard versio
## 1245E [none] 
   OUT: Print only one line containing a single floating-point number — the minimum expected number of turns Hyakugoku can take to finish the game. Your answer will be considered correct if its absolute or relative error does not exceed 1
## 1582F1 [none] 
   OUT: In the first line print a single integer k — the number of found x values. In the second line print k integers in increasing order x_1, x_2, \ldots x_k ( 0 \le x_1 < \ldots < x_k ) — found x values.
## 1148F [none] 
   OUT: Print an integer s ( 1 \le s \le 2^62 - 1 ), such that if we modify the objects as described above, the sign of the sum of val_i changes its sign. If there are multiple such s , print any of them. One can show that there is always
## 360A [none] 
   OUT: In the first line print "YES" (without the quotes), if the solution exists and "NO" (without the quotes) otherwise. If the solution exists, then on the second line print n integers a1, a2, ... , an (|ai| ≤ 109) — the recovered arr
## 1663G [none] 
   OUT: A string consisting of only 6 characters.
## 1115G2 [none] 
   OUT: 
## 1857E [none] 
   OUT: For each test case, output n integers, where the i -th integer is equal to the sum of the powers of all points for s=x_i .
## 1212A [none] 
   OUT: Print one integer number — the result of the decreasing n by one k times. It is guaranteed that the result will be positive integer number.
## 1428G2 [none] 
   OUT: Print q lines, where the i -th line contains the maximum sum of fortune of all numbers of the i -th sheep.
## 955C [none] 
   OUT: Output Q lines — the answers to the queries.
## 868C [none] 
   OUT: Print "YES" (quotes for clarity), if it is possible to make an interesting problemset, and "NO" otherwise. You can print each character either upper- or lowercase ("YeS" and "yes" are valid when the answer is "YES").
## 1381E [none] 
   OUT: For each query, output the area A_i of the paper if you fold it along the line x=f_i . Your answer is considered correct if its absolute or relative error does not exceed 10^-4 . Formally, let your answer be a , and the jury's ans
## 1080F [none] 
   OUT: For each query, print "yes" or "no" in a new line.
## 1514A [none] 
   OUT: If there's a subsequence of a whose product isn't a perfect square, print "YES". Otherwise, print "NO".
## 1148A [none] 
   OUT: Print a single number — the maximum possible length of the good string you can obtain.
## 676C [none] 
   OUT: Print the only integer — the maximum beauty of the string Vasya can achieve by changing no more than k characters.
## 1486C2 [none] 
   OUT: 
## 2022A [none] 
   OUT: For each test case, output the maximum number of happy people in an optimal seating arrangement.
## 1630B [none] 
   OUT: For each test case, print k+1 lines. In the first line, print x and y — the limits of the found range. Then print k lines, the i -th should contain l_i and r_i ( 1\leq l_i \leq r_i \leq n ) — the limits of the i -th subarray. You 
## 1929B [none] 
   OUT: For each test case, output a single integer — the minimum number of cells that need to be colored.
