摘要: Unlucky year in Berland is such a year that its number n can be represented as n = xa + yb, where a and b are non-negative integer numbers. For exampl 阅读全文
posted @ 2019-01-11 21:01 茄子Min 阅读(323) 评论(0) 推荐(0) 编辑
摘要: Pasha is participating in a contest on one well-known website. This time he wants to win the contest and will do anything to get to the first place! T 阅读全文
posted @ 2019-01-11 17:39 茄子Min 阅读(267) 评论(0) 推荐(0) 编辑
摘要: You are given an integer sequence 1,2,…,n1,2,…,n. You have to divide it into two sets AAand BB in such a way that each element belongs to exactly one  阅读全文
posted @ 2019-01-11 12:30 茄子Min 阅读(681) 评论(0) 推荐(0) 编辑
摘要: You are given a string ss consisting of exactly nn characters, and each character is either '0', '1' or '2'. Such strings are called ternary strings. 阅读全文
posted @ 2019-01-11 00:11 茄子Min 阅读(530) 评论(0) 推荐(0) 编辑