摘要: D. Tree Requests time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Roman plant... 阅读全文
posted @ 2018-04-16 21:01 ACagain 阅读(106) 评论(0) 推荐(0) 编辑
摘要: D. Bear and Blocks time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Limak is a... 阅读全文
posted @ 2018-04-16 20:38 ACagain 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 题目: There is a polyline going through points (0, 0) – (x, x) – (2x, 0) – (3x, x) – (4x, 0) – … - (2kx, 0) – (2kx + x, x) – ….We know t... 阅读全文
posted @ 2018-04-16 20:32 ACagain 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he measur... 阅读全文
posted @ 2018-03-29 21:10 ACagain 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目 After Vitaly was expelled from the university, he became interested in the graph theory.Vitaly especially liked the cycles of an od... 阅读全文
posted @ 2018-03-26 16:41 ACagain 阅读(96) 评论(0) 推荐(0) 编辑
摘要: C. Writing Code time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Programmers ... 阅读全文
posted @ 2018-02-06 22:36 ACagain 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cnblogs.com/kevince/p/3893531.html ——By Kevince最近做了一些需要离散数据的题目,比如URAL 1019 以及POJ 2528等,由于数据较大,如果用传统的方法建立对应的数据结构消耗的内存... 阅读全文
posted @ 2017-09-28 20:56 ACagain 阅读(1559) 评论(0) 推荐(0) 编辑
摘要: 题意就是求n的k次方的前三位和后三位 - 后三位快速幂取模就行。 - 前三位,首先pow(n,k)=pow(10,k*lg(n)),此时可以看出pow(n,k)的值的位数是由k *lg(n)的整数部分决定,而值是由其小数部分决定,因此只取前三位的话让k *lg(n)的... 阅读全文
posted @ 2017-08-22 20:57 ACagain 阅读(146) 评论(0) 推荐(0) 编辑
摘要: In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers: In this problem, you are gi... 阅读全文
posted @ 2017-08-21 21:31 ACagain 阅读(1255) 评论(0) 推荐(0) 编辑
摘要: Goldbach's conjecture is one of the oldest unsolved problems in number theory and in all of mathematics. It states:Every even integer,... 阅读全文
posted @ 2017-08-21 21:25 ACagain 阅读(113) 评论(0) 推荐(0) 编辑