03 2019 档案
摘要:You are given a tree (a connected undirected graph without cycles) of 𝑛n vertices. Each of the 𝑛−1n−1 edges of the tree is colored in either black o
阅读全文
摘要:You went to the store, selling 𝑛n types of chocolates. There are 𝑎𝑖ai chocolates of type 𝑖i in stock. You have unlimited amount of cash (so you ar
阅读全文
摘要:You are given a string 𝑠=𝑠1𝑠2…𝑠𝑛s=s1s2…sn of length 𝑛n, which only contains digits 11, 22, ..., 99. A substring 𝑠[𝑙…𝑟]s[l…r] of 𝑠s is a stri
阅读全文
摘要:E. Superhero Battle A superhero fights with a monster. The battle consists of rounds, each of which lasts exactly 𝑛n minutes. After a round ends, the
阅读全文