摘要: For each string s consisting of characters '0' and '1' one can define four integers a00, a01, a10 and a11, where axy is the number of subsequences of 阅读全文
posted @ 2018-12-16 17:22 NKDEWSM 阅读(179) 评论(0) 推荐(0) 编辑
摘要: You are given a non-empty string s consisting of lowercase English letters. You have to pick exactly one non-empty substring of s and shift all its le 阅读全文
posted @ 2018-12-16 17:10 NKDEWSM 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Vasya takes part in the orienteering competition. There are n checkpoints located along the line at coordinates x1, x2, ..., xn. Vasya starts at the p 阅读全文
posted @ 2018-12-16 17:08 NKDEWSM 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting w 阅读全文
posted @ 2018-12-16 17:05 NKDEWSM 阅读(233) 评论(0) 推荐(0) 编辑