原创 Obtain a Permutation
You are given a rectangular matrix of size n×mn×mn×m consisting of integers from 111 to 2⋅1052⋅10^52⋅105. In one mo
原创 Three Paths on a Tree
You are given an unweighted tree with n vertices. Recall that a tree is a connected undirected graph without cycles
原创 MEX maximizing
Recall that MEX of an array is a minimum non-negative integer that does not belong to the array. Examples: for the
原创 Minimax Problem
You are given nnn arrays a1,a2,...,ana_1, a_2, ..., a_na1,a2,...,an; each array consists of exactly m integers.
原创 Permutation Separation
You are given a permutation p1,p2,…,pnp_1,p_2,…,p_np1,p2,…,pn (an array where each integer from 1 to n appears e
原创 Berland Beauty
There are n railway stations in Berland. They are connected to each other by n−1 railway sections. The railway netw
原创 String Coloring
String Coloring (easy version) This is an easy version of the problem. The actual problems are different, but the e
原创 CF1354D Multiset
Note that the memory limit is unusual. You are given a multiset consisting of n integers. You have to process queri
原创 Arpa’s letter-marked tree and Mehrdad’s Dokhtar-kosh paths
Just in case somebody missed it: we have wonderful girls in Arpa’s land. Arpa has a rooted tree (connected acyclic
原创 CF1354E Graph Coloring
You are given an undirected graph without self-loops or multiple edges which consists of n vertices and m edges. Al
原创 Tree Requests
Roman planted a tree consisting of n vertices. Each vertex contains a lowercase English letter. Vertex 1 is the roo
原创 Lomsat gelral(樹上啓發式合併/動態開點與線段樹合併)
You are given a rooted tree with root in vertex 1. Each vertex is coloured in some colour. Let’s call colour c domi
原创 Count Triangles
Like any unknown mathematician, Yuri has favourite numbers: A, B, C, and D, where A≤B≤C≤DA≤B≤C≤DA≤B≤C≤D. Yuri also
原创 Leapin' Lizards
Your platoon of wandering lizards has entered a strange room in the labyrinth you are exploring. As you are looking
原创 Marriage Match IV
Do not sincere non-interference。 Like that show, now starvae also take part in a show, but it take place between ci