摘要: D. Once Again... You are given an array of positive integers a1, a2, ..., an × T of length n × T. We know that for any i > n it is true that ai = ai - 阅读全文
posted @ 2016-07-13 21:19 MartinEden 阅读(259) 评论(0) 推荐(0) 编辑
摘要: C. GCD Table C. GCD Table The GCD table G of size n × n for an array of positive integers a of length n is defined by formula Let us remind you that t 阅读全文
posted @ 2016-07-13 21:09 MartinEden 阅读(138) 评论(0) 推荐(0) 编辑
摘要: E. Alice, Bob, Oranges and Apples E. Alice, Bob, Oranges and Apples Alice and Bob decided to eat some fruit. In the kitchen they found a large bag of 阅读全文
posted @ 2016-07-12 21:09 MartinEden 阅读(240) 评论(0) 推荐(0) 编辑
摘要: D. Phillip and Trains D. Phillip and Trains The mobile application store has a new game called "Subway Roller". The protagonist of the game Philip is 阅读全文
posted @ 2016-07-12 21:05 MartinEden 阅读(165) 评论(0) 推荐(0) 编辑
摘要: D. Dima and Lisa D. Dima and Lisa Dima loves representing an odd number as the sum of multiple primes, and Lisa loves it when there are at most three 阅读全文
posted @ 2016-07-12 20:43 MartinEden 阅读(204) 评论(0) 推荐(0) 编辑
摘要: C. Gennady the Dentist time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Gennady the Den 阅读全文
posted @ 2016-07-11 21:22 MartinEden 阅读(181) 评论(0) 推荐(0) 编辑
摘要: X mod f(x) Problem Description Here is a function f(x): int f ( int x ) { if ( x == 0 ) return 0; return f ( x / 10 ) + x % 10; } Now, you want to kno 阅读全文
posted @ 2016-07-11 21:13 MartinEden 阅读(123) 评论(0) 推荐(0) 编辑
摘要: How Many O's? 题意是求区间内数字中0的个数,比如100就有两个0。 数位dp吧,dp[i][j][k], i很明显表示当前位置,j表示找到的0的个数,k表示要找的0的个数。因为数字里0的个数最多32个,所以可以枚举32种k的情况,用数位dp去找。 阅读全文
posted @ 2016-07-11 11:09 MartinEden 阅读(178) 评论(0) 推荐(0) 编辑
摘要: D. Remainders Game D. Remainders Game Today Pari and Arya are playing a game called Remainders. Pari chooses two positive integer x and k, and tells A 阅读全文
posted @ 2016-07-10 21:15 MartinEden 阅读(199) 评论(0) 推荐(0) 编辑
摘要: F. Ant colony F. Ant colony Mole is hungry again. He found one ant colony, consisting of n ants, ordered in a row. Each ant i (1 ≤ i ≤ n) has a streng 阅读全文
posted @ 2016-07-10 21:10 MartinEden 阅读(345) 评论(0) 推荐(0) 编辑