摘要:
Bob has given Alice a necklace as her birthday gift. That necklace has 𝑁N crystals, 𝑀M of which catches her fancy. Formally, crystals with labels of 阅读全文
摘要:
Once there was a rooted tree. The tree contained n nodes, which were numbered 1,…,n. The node numbered 1 was the root of the tree. Besides, every node 阅读全文
摘要:
507. Treediff Time limit per test: 0.25 second(s) Memory limit: 262144 kilobytes input: standard output: standard Andrew has just made a breakthrough 阅读全文
摘要:
You are given a rooted tree with root in vertex 1. Each vertex is coloured in some colour. Let's call colour c dominating in the subtree of vertex v i 阅读全文
摘要:
Grammy is playing a game with her roommate Alice on a sequence 𝐴A with 𝑛n non-negative integers 𝐴1,𝐴2,…,𝐴𝑛A1,A2,…,An. The rules of the game are 阅读全文
摘要:
After the last network breakdown, you've been assigned to redesign the signal transmission network of ICPC (Internet Clogging Prevention Corporation)! 阅读全文
摘要:
An integer sequence with length 𝑛n, denoted by 𝑎1,𝑎2,⋯,𝑎𝑛a1,a2,⋯,an, is generated randomly, and the probability of being 1,2,⋯,𝑛1,2,⋯,n are all 阅读全文
摘要:
The robot is located on a checkered rectangular board of size 𝑛×𝑚n×m (𝑛n rows, 𝑚m columns). The rows in the board are numbered from 11 to 𝑛n from 阅读全文