上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 25 下一页

2014年3月17日

求解欧拉函数值

摘要: 1 /************************************************************************* 2 > File Name: phi.cpp 3 > Author: wangzhili 4 > Mail: wangstdio.h@gmail.com 5 > Created Time: 2014年03月17日 星期一 21时05分09秒 6 *******************************************************... 阅读全文

posted @ 2014-03-17 21:32 ~Love() 阅读(409) 评论(0) 推荐(0)

扩展欧几里德

摘要: 1 /************************************************************************* 2 > File Name: extend_gcd.cpp 3 > Author: wangzhili 4 > Mail: wangstdio.h@gmail.com 5 > Created Time: 2014年03月17日 星期一 20时47分53秒 6 ************************************************... 阅读全文

posted @ 2014-03-17 21:30 ~Love() 阅读(118) 评论(0) 推荐(0)

快速幂取模

摘要: 递归实现: 1 /************************************************************************* 2 2 > File Name: pow_mod.cpp 3 3 > Author: wangzhili 4 4 > Mail: wangstdio.h@gmail.com 5 5 > Created Time: 2014年03月17日 星期一 20时59分52秒 6 6 ******************************... 阅读全文

posted @ 2014-03-17 21:29 ~Love() 阅读(171) 评论(0) 推荐(0)

codeforces --- 14D

摘要: C -Two PathsTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 14DDescriptionAs you know, Bob's brother lives in Flatland. In Flatland there arencities, connected byn - 1two-way roads. The cities are numbered from 1 ton. You can get from one city 阅读全文

posted @ 2014-03-17 20:40 ~Love() 阅读(293) 评论(0) 推荐(0)

2014年3月16日

codeforces --- 302D

摘要: D. Yaroslav and Timetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYaroslav is playing a game called "Time". The game has a timer showing the lifespan he's got left. As soon as the timer shows 0, Yaroslav's character dies and t 阅读全文

posted @ 2014-03-16 17:27 ~Love() 阅读(185) 评论(0) 推荐(0)

POJ 1144

摘要: A -NetworkTime Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 1144DescriptionA Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N . No two places have the same numbe 阅读全文

posted @ 2014-03-16 17:25 ~Love() 阅读(197) 评论(0) 推荐(0)

codeforces --- 115A

摘要: A. Partytime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA company hasnemployees numbered from1ton. Each employee either has no immediate manager or exactly one immediate manager, who is another employee with a different number. An employeeAis sai 阅读全文

posted @ 2014-03-16 17:21 ~Love() 阅读(162) 评论(0) 推荐(0)

codeforce --- 237C

摘要: C. Primes on Intervaltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has exactly two distinct positive integ 阅读全文

posted @ 2014-03-16 17:18 ~Love() 阅读(246) 评论(0) 推荐(0)

codeforce --- 340D

摘要: D. Bubble Sort Graphtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub recently has learned Bubble Sort, an algorithm that is used to sort a permutation withnelementsa1,a2, ...,anin ascending order. He is bored of this so simple algorithm, so h 阅读全文

posted @ 2014-03-16 17:16 ~Love() 阅读(205) 评论(0) 推荐(0)

HUD --- 3635

摘要: Five hundred years later, the number of dragon balls will increase unexpectedly, so it's too difficult for Monkey King(WuKong) to gather all of the dragon balls together.His country has N cities and there are exactly N dragon balls in the world. At first, for the ith dragon ball, the sacred drag 阅读全文

posted @ 2014-03-16 17:07 ~Love() 阅读(205) 评论(0) 推荐(0)

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 25 下一页

导航