摘要: Alice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards respectively. Alice w 阅读全文
posted @ 2019-07-24 23:27 GRedComeT 阅读(108) 评论(0) 推荐(0) 编辑
摘要: You can perfectly predict the price of a certain stock for the next N days. You would like to profit on this knowledge, but only want to transact one 阅读全文
posted @ 2019-07-24 20:56 GRedComeT 阅读(105) 评论(0) 推荐(0) 编辑
摘要: As meticulous Gerald sets the table and caring Alexander sends the postcards, Sergey makes snowmen. Each showman should consist of three snowballs: a 阅读全文
posted @ 2019-07-24 17:54 GRedComeT 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Farmer John went to cut some wood and left N (2 ≤ N ≤ 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the clus 阅读全文
posted @ 2019-07-24 16:53 GRedComeT 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea 阅读全文
posted @ 2019-07-24 16:24 GRedComeT 阅读(131) 评论(0) 推荐(0) 编辑
摘要: You are given a rooted tree with n vertices. The vertices are numbered from 1 to n, the root is the vertex number 1. Each vertex has a color, let's de 阅读全文
posted @ 2019-07-24 15:16 GRedComeT 阅读(138) 评论(0) 推荐(0) 编辑