摘要: Description考虑正整数集合,现在有n组人依次来取数,假设第i组来了x人,他们每个取的数一定是x的倍数,并且是还剩下的最小的x个。正整数中有m个数被标成了幸运数,问有哪些人取到了幸运数。Input第一行一个正整数m (m<=1,000,000),下面m行每行一个正整数x (x<=1,000,... 阅读全文
posted @ 2015-04-01 22:44 TCtower 阅读(270) 评论(0) 推荐(0) 编辑
摘要: Description硬币购物一共有4种硬币。面值分别为c1,c2,c3,c4。某人去商店买东西,去了tot次。每次带di枚ci硬币,买si的价值的东西。请问每次有多少种付款方法。Input第一行 c1,c2,c3,c4,tot 下面tot行 d1,d2,d3,d4,sOutput每次的方法数Sam... 阅读全文
posted @ 2015-04-01 21:51 TCtower 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Vanya decided to walk in the field of size n × n cells. The field contains m apple trees, the i-th apple tree is at the cell with coordinates (xi, yi)... 阅读全文
posted @ 2015-04-01 21:37 TCtower 阅读(254) 评论(0) 推荐(0) 编辑
摘要: Vasya is studying in the last class of school and soon he will take exams. He decided to study polynomials. Polynomial is a function P(x) = a0 + a1x1 ... 阅读全文
posted @ 2015-04-01 21:00 TCtower 阅读(316) 评论(0) 推荐(0) 编辑
摘要: Description 有一张N×m的数表,其第i行第j列(1 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include 15 #include ... 阅读全文
posted @ 2015-04-01 10:35 TCtower 阅读(338) 评论(0) 推荐(0) 编辑