摘要: 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 阅读全文
posted @ 2019-03-23 13:11 HazelNuto 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-03-23 13:02 HazelNuto 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-03-23 12:57 HazelNuto 阅读(233) 评论(0) 推荐(0) 编辑