Problem Description “The Werewolves” is a popular card game among young people.In the basic game, there are 2 different groups: the werewolves and the villagers. Each player will debate a player th
Problem Description Steve has an integer array a of length n (1-based). He assigned all the elements as zero at the beginning. After that, he made m operations, each of which is to update an interva
Problem Description Anton has a positive integer n, however, it quite looks like a mess, so he wants to make it beautiful after k swaps of digits. Let the decimal representation of n as (x1x2⋯xm)10
Problem Description Kazari remembered that she had an expression s0 before. Definition of expression is given below in Backus–Naur form. ::= | ::= “+” | “*” ::= “0” | ::= “” | ::= “0” | ::= “
Problem Description Little Q and Little T are playing a game on a tree. There are n vertices on the tree, labeled by 1,2,…,n, connected by n−1 bidirectional edges. The i-th vertex has the value of w