POJ
oopslb
这个作者很懒,什么都没留下…
展开
-
poj3176
Cow BowlingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 19801 Accepted: 13123DescriptionThe cows don't use actual bowling balls when they go bowling.原创 2017-08-08 10:17:29 · 248 阅读 · 0 评论 -
poj 3107 Godfather (树的重心)
http://poj.org/problem?id=3107 题意:删掉某点后子树节点最多的最小思路:其实就是求树的重心代码:#include<iostream>#include<stdio.h>#include<string.h>#include<algorithm>#include<vector>u...原创 2018-08-17 13:38:40 · 191 阅读 · 0 评论 -
poj 1811 Prime Test(大素数判断+素因子判断)
题目链接:http://poj.org/problem?id=1811题意:判断一个数是否为素数,如果不是则找到它最小的素数因子。思路:因为n很大,不好打表处理,用miller_rabin判断n是否为素数,再用Pollard_rho算法找素数因子。代码:#include <iostream>#include <stdio.h>#include <string.h&...原创 2018-07-13 13:21:36 · 240 阅读 · 0 评论 -
poj 1035 Spell checker
Spell checkerTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 26110 Accepted: 9569DescriptionYou, as a member of a development team for a new spell check原创 2017-11-10 15:50:43 · 263 阅读 · 0 评论 -
poj3616
Milking TimeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10268 Accepted: 4291DescriptionBessie is such a hard-working cow. In fact, she is so focused原创 2017-08-08 10:36:52 · 283 阅读 · 0 评论 -
poj1065
Wooden SticksTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 23751 Accepted: 10236DescriptionThere is a pile of n wooden sticks. The length and weight o原创 2017-08-09 17:36:25 · 146 阅读 · 0 评论 -
poj3280
Cheapest PalindromeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 10203 Accepted: 4892DescriptionKeeping track of all the cows can be a tricky task so原创 2017-08-08 10:49:41 · 165 阅读 · 0 评论 -
poj2385
Apple CatchingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12979 Accepted: 6308DescriptionIt is a little known fact that cows love apples. Farmer Joh原创 2017-08-08 10:32:44 · 164 阅读 · 0 评论 -
poj2229
SumsetsTime Limit: 2000MS Memory Limit: 200000KTotal Submissions: 19539 Accepted: 7635DescriptionFarmer John commanded his cows to search for different sets of nu原创 2017-08-08 10:21:20 · 160 阅读 · 0 评论 -
poj 2378 Tree Cutting (树形dp)
http://poj.org/problem?id=2378 题意: 给一颗n个结点的树,节点编号为1~n,把删除一个节点之后, 剩下的分支中节点数量最多的数量不大于总数量一半的编号全部按顺序输出 思路: 跟求树的重心一样的方法,先从下往上更新,在从上往下跟新即可。代码:#include<iostream>#include<stdi...原创 2018-08-17 14:07:09 · 125 阅读 · 0 评论