摘要: DescriptionMr. O'Cruel is teaching Math to ninth grade students. Students of course are very lazy, so they do not like to do their homework. On the ot... 阅读全文
posted @ 2015-04-02 08:11 TCtower 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(261) 评论(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 阅读(210) 评论(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 阅读(249) 评论(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 阅读(311) 评论(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 阅读(335) 评论(0) 推荐(0) 编辑
摘要: Description 有一天Petya和他的朋友Vasya在进行他们众多旅行中的一次旅行,他们决定去参观一座城堡博物馆。这座博物馆有着特别的样式。它包含由m条走廊连接的n间房间,并且满足可以从任何一间房间到任何一间别的房间。两个人在博物馆里逛了一会儿后两人决定分头行动,去看各自感兴趣的艺术品。他... 阅读全文
posted @ 2015-03-31 22:36 TCtower 阅读(409) 评论(0) 推荐(0) 编辑
摘要: All submissions for this problem are available.Read problems statements in Mandarin Chinese and Russian.This problem's statement is really a short on... 阅读全文
posted @ 2015-03-31 21:26 TCtower 阅读(347) 评论(0) 推荐(0) 编辑
摘要: Description根据一些书上的记载,上帝的一次失败的创世经历是这样的:第一天, 上帝创造了一个世界的基本元素,称做“元”。第二天, 上帝创造了一个新的元素,称作“α”。“α”被定义为“元”构成的集合。容易发现,一共有两种不同的“α”。第三天, 上帝又创造了一个新的元素,称作“β”。“β”被定义... 阅读全文
posted @ 2015-03-31 20:32 TCtower 阅读(1150) 评论(0) 推荐(1) 编辑
摘要: Vasya is sitting on an extremely boring math class. To have fun, he took a piece of paper and wrote out nnumbers on a single line. After that, Vasya b... 阅读全文
posted @ 2015-03-31 20:06 TCtower 阅读(401) 评论(0) 推荐(0) 编辑