摘要: 大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了! 做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。 话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一个神奇的女生,在英语考试的时候,竟然把 阅读全文
posted @ 2018-11-23 15:07 suvvm 阅读(400) 评论(0) 推荐(0) 编辑
摘要: Eddy's AC难题 Eddy是个ACMer,他不仅喜欢做ACM题,而且对于Ranklist中每个人的ac数量也有一定的研究,他在无聊时经常在纸上把Ranklist上每个人的ac题目的数量摘录下来,然后从中选择一部分人(或者全部)按照ac的数量分成两组进行比较,他想使第一组中的最小ac数大于第二组 阅读全文
posted @ 2018-11-23 14:30 suvvm 阅读(226) 评论(0) 推荐(0) 编辑
摘要: M斐波那契数列 M斐波那契数列F[n]是一种整数数列,它的定义如下: F[0] = a F[1] = b F[n] = F[n-1] * F[n-2] ( n > 1 ) 现在给出a, b, n,你能求出F[n]的值吗? Input 输入包含多组测试数据; 每组数据占一行,包含3个整数a, b, n 阅读全文
posted @ 2018-11-22 23:35 suvvm 阅读(379) 评论(0) 推荐(0) 编辑
摘要: Jzzhu and Sequences Jzzhu has invented a kind of sequences, they meet the following property: You are given x and y, please calculate fn modulo 100000 阅读全文
posted @ 2018-11-22 21:53 suvvm 阅读(314) 评论(0) 推荐(0) 编辑
摘要: Revenge of GCD In mathematics, the greatest common divisor (gcd), also known as the greatest common factor (gcf), highest common factor (hcf), or grea 阅读全文
posted @ 2018-11-22 20:16 suvvm 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 本原串 由0和1组成的串中,不能表示为由几个相同的较小的串连接成的串,称为本原串,有多少个长为n(n<=100000000)的本原串? 答案mod2008. 例如,100100不是本原串,因为他是由两个100组成,而1101是本原串。 Input 本原串 由0和1组成的串中,不能表示为由几个相同的较 阅读全文
posted @ 2018-11-22 00:34 suvvm 阅读(253) 评论(0) 推荐(0) 编辑
摘要: Large Division Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer  阅读全文
posted @ 2018-11-19 21:46 suvvm 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 旅行comf 给你一个无向图,N(N<=500)个顶点, M(M<=5000)条边,每条边有一个权值Vi(Vi<30000)。给你两个顶点S和T,求一条路径,使得路径上最大边和最小边的比值最小。如果S和T之间没有路径,输出”IMPOSSIBLE”,否则输出这个比值,如果需要,表示成一个既约分数。 备 阅读全文
posted @ 2018-11-16 00:42 suvvm 阅读(270) 评论(0) 推荐(0) 编辑
摘要: Destroy Walls Long times ago, there are beautiful historic walls in the city. These walls divide the city into many parts of area. Since it was not co 阅读全文
posted @ 2018-11-14 23:52 suvvm 阅读(364) 评论(0) 推荐(0) 编辑
摘要: find the safest road find the safest road XX星球有很多城市,每个城市之间有一条或多条飞行通道,但是并不是所有的路都是很安全的,每一条路有一个安全系数s,s是在 0 和 1 间的实数(包括0,1),一条从u 到 v 的通道P 的安全度为Safe(P) = s 阅读全文
posted @ 2018-11-13 22:56 suvvm 阅读(255) 评论(0) 推荐(0) 编辑