Bad Ugly Numbers

2020 VietMX 0

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 […]

Maximums

2020 VietMX 0

Alicia has an array, $a_1, a_2, \ldots, a_n$, of non-negative integers. For each $1 \leq i \leq n$, she has found a non-negative integer $x_i […]

Bombs

2020 VietMX 0

You are given a permutation, $p_1, p_2, \ldots, p_n$. Imagine that some positions of the permutation contain bombs, such that there exists at least one […]

Elementary

2020 VietMX 2

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 […]

Again?

2020 VietMX 0

Input The only line of the input contains a 7-digit hexadecimal number. The first “digit” of the number is letter A, the rest of the […]

Jordan Smiley

2020 VietMX 0

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 […]

Lingua Romana

2020 VietMX 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 […]

Limericks

2020 VietMX 1

There was once young lass called Mary, Whose jokes were occasionally scary. On this April’s Fool Fixed limerick rules Allowed her to trip the unwary.Can […]

Dreamoon Likes Coloring

2020 VietMX 0

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

2020 VietMX 0

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

2020 VietMX 0

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 < […]

Powered Addition

2020 VietMX 0

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: […]

Edge Weight Assignment

2020 VietMX 0

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 […]