数论
文章平均质量分 86
SCUT-monstersecond
no loneliness like flowing water,just talk to the blue sky.
展开
-
poj2065-SETI
poj2065-SETI#include <iostream>#include <cstdio>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const int MAXN = 80;int MOD, n;char bri[MAXN];int a[MAXN][MAXN], ans[MA原创 2017-09-29 16:12:35 · 178 阅读 · 0 评论 -
poj3111-K Best
poj 3111-K Best K Best Time Limit: 8000MSMemory Limit: 65536K Total Submissions: 11420Accepted: 2948 Case Time Limit: 2000MSSpecial Judge Description Demy has n jewels. Each of her jewels has原创 2017-09-29 21:27:45 · 176 阅读 · 0 评论 -
poj3735-Training little cats
poj3735 Training little cats Training little cats Time Limit: 2000MSMemory Limit: 65536K Total Submissions: 14750Accepted: 3648 Description Facer’s pet cat just gave birth to a brood of little原创 2017-09-28 19:50:41 · 271 阅读 · 0 评论 -
UVa10288 - Coupons
UVa10288 - Coupons Coupons in cereal boxes are numbered 1 to n, and a set of one of each is required for a prize (a cereal box, of course). With one coupon per box, how many boxes on average are requ原创 2017-09-30 21:53:02 · 355 阅读 · 0 评论 -
UVa10294 - Arif in Dhaka (First Love Part 2)
UVa10294 - Arif in Dhaka (First Love Part 2) Our hero Arif is now in Dhaka (Look at problem 10244 – First Love if you want to know more about Arif, but that information is not necessary for this prob原创 2017-10-01 14:38:27 · 251 阅读 · 0 评论 -
51node-Bash game V1V2V3V4
51node-Bash gameV1V2V3V4Bash game v1: 有一堆石子共有N个。A B两个人轮流拿,A先拿。每次最少拿1颗,最多拿K颗,拿到最后1颗石子的人获胜。假设A B都非常聪明,拿石子的过程中不会出现失误。给出N和K,问最后谁能赢得比赛。 例如N = 3,K = 2。无论A如何拿,B都可以拿到最后1颗石子。解: 最基本的Bash game,显然,只有n % (k+原创 2017-10-02 08:40:26 · 380 阅读 · 0 评论 -
poj1595-Prime Cuts
poj1595-Prime Cuts(筛法求素数) Prime Cuts Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 11684 Accepted: 4449 Description A prime number is a counting number (1, 2, 3, …) tha原创 2017-10-02 15:16:20 · 231 阅读 · 0 评论 -
poj-3641Pseudoprime numbers
poj-3641Pseudoprime numbers Pseudoprime numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10836 Accepted: 4686 Description Fermat’s theorem states that for any prim原创 2017-10-02 16:58:33 · 184 阅读 · 0 评论