
Bad Ugly Numbers
You are given a integer $n$ ($n > 0$). Find any integer $s$ which satisfies these conditions, or report that there are no such numbers: In the […]
You are given a integer $n$ ($n > 0$). Find any integer $s$ which satisfies these conditions, or report that there are no such numbers: In the […]
You are given a permutation $p_1, p_2, \ldots, p_n$ of integers from $1$ to $n$ and an integer $k$, such that $1 \leq k \leq […]
This is the hard version of the problem. The difference is the constraint on the sum of lengths of strings and the number of test […]
This is the easy version of the problem. The difference is the constraint on the sum of lengths of strings and the number of test […]
This is the easy version of the problem. The difference is constraints on the number of wise men and the time limit. You can make […]
This is the hard version of the problem. The difference is constraints on the number of wise men and the time limit. You can make […]
Input The input consists of a single string of uppercase letters A-Z. The length of the string is between 1 and 10 characters, inclusive.Output Output […]
Input The input contains a single integer $a$ ($0 \le a \le 63$).Output Output a single number. Examples input 2 output 2 input 5 output […]
Input The input contains two integers $row$, $col$ ($0 \le row, col \le 63$), separated by a single space.Output Output “IN” or “OUT”.Examplesinput 0 0 […]
per nextum in unam tum XI conscribementis fac sic vestibulo perlegementum da varo. morde varo. seqis cumula varum.cisper nextum in unam tum XI conscribementis fac […]
Dreamoon likes sequences very much. So he created a problem about the sequence that you can’t find in OEIS: You are given two integers $d, […]
Dreamoon likes coloring cells very much. There is a row of $n$ cells. Initially, all cells are empty (don’t contain any color). Cells are numbered […]
Drazil likes heap very much. So he created a problem with heap: There is a max heap with a height $h$ implemented on the array. […]
Dreamoon likes strings. Today he created a game about strings: String $s_1, s_2, \ldots, s_n$ is beautiful if and only if for each $1 \le i < […]
You have an array $a$ of length $n$. For every positive integer $x$ you are going to perform the following operation during the $x$-th second: […]
You have unweighted tree of $n$ vertices. You have to assign a positive weight to each edge so that the following condition would hold: For every two […]