![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
POJ
ITKaven
ACMER
本科软件工程专业
硕士计算机技术专业
专注于WEB开发的烟酒僧
展开
-
POJ 1811 Prime Test(大素数判断和素因子分解)
数据比较大,只能先用Miller Rabin算法进行素数判断。 再用Pollard Rho分解因子。代码:#include<cstdio>#include<cstdlib>#include<ctime>using namespace std;typedef long long ll;int const maxn=10000+100;ll...原创 2018-08-08 09:46:20 · 889 阅读 · 0 评论 -
POJ 1320 Street Number (佩尔方程)
题意:求两个不等的整数(n,m)使得:1+2+...+n=(n+1)+...+m分析:1+2+…+n=n(n+1)/2=(n+1)+…+m=(m-n)*(m+n+1)/2,即:(2m+1)^2-8n^2=1;设:x=2m+1,y=n,则:x^2-8y^2=1;这是典型的佩尔方程。已知x1=3,y1=1佩尔方程的迭代公式:x[n]=x[n-1]*x1+d*y[n-1]*y1...原创 2018-08-08 10:04:37 · 977 阅读 · 0 评论 -
树的重心练习
POJ 1655 模板题 代码:#include<cstdio>#include<vector>#include<algorithm>using namespace std;const int INF=0x3f3f3f3f;const int maxn=20000+100;vector<int>G[maxn];int s...原创 2018-08-09 09:37:05 · 1515 阅读 · 0 评论 -
POJ 2187 Beauty Contest(凸包+旋转卡壳)
题目大意:给出若干个农场的坐标,求出相距最远的农场的直线距离的平方。 题解: 首先扫描法求出凸包,旋转卡壳求出最大值即可 代码:#include&lt;cstdio&gt;#include&lt;cmath&gt;#include&lt;algorithm&gt;using namespace std;typedef long long ll;const int ma...原创 2018-08-14 14:58:32 · 940 阅读 · 0 评论 -
POJ-2139 Six Degrees of Cowvin Bacon
题目传送门 Six Degrees of Cowvin Bacon Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6179 Accepted: 2893 DescriptionThe cows have been making movies lately, so they are ready to pl原创 2017-09-25 11:05:30 · 4322 阅读 · 0 评论 -
POJ-2377 Bad Cowtractors
题目传送门 Bad Cowtractors Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16504 Accepted: 6714 DescriptionBessie has been hired to build a cheap internet network among Farmer Joh原创 2017-09-25 11:32:37 · 4104 阅读 · 0 评论 -
POJ-2395 Out of Hay
题目传送门 Out of Hay Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17916 Accepted: 7071 DescriptionThe cows have run out of hay, a horrible event that must be remedied immediat原创 2017-09-25 11:56:46 · 3844 阅读 · 0 评论 -
POJ 2456-Aggressive cows
题目传送门 Aggressive cows Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16080 Accepted: 7693 DescriptionFarmer John has built a new long barn, with N (2 <= N <= 100,000) stalls原创 2017-10-16 10:54:12 · 3544 阅读 · 0 评论 -
POJ 3061-Subsequence
题目传送门 Subsequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16849 Accepted: 7159 DescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than原创 2017-10-17 17:34:29 · 3379 阅读 · 0 评论 -
POJ-3190 Stall Reservations
题目传送门 Stall Reservations Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7741 Accepted: 2742 Special Judge DescriptionOh those picky N (1 <= N <= 50,000) cows! They are so原创 2017-09-23 21:10:55 · 4256 阅读 · 0 评论 -
POJ 2376-Cleaning Shifts
Cleaning Shifts Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 24288 Accepted: 6076 DescriptionFarmer John is assigning some of his N (1 <= N <= 25,000) cows to do some clean原创 2017-09-23 09:41:27 · 4385 阅读 · 0 评论 -
POJ-1979 Red and Bla
题目传送门 Red and Black Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 37356 Accepted: 20315 DescriptionThere is a rectangular room, covered with square tiles. Each tile is colo原创 2017-09-20 17:08:56 · 4212 阅读 · 0 评论 -
POJ-3723 Conscription
题目传送门 Conscription Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14389 Accepted: 5013 DescriptionWindy has a country, and he wants to build an army to protect his country.原创 2017-09-16 21:32:49 · 4237 阅读 · 0 评论 -
POJ1821-Fence
题目传送门 Fence Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 5111 Accepted: 1618 DescriptionA team of k (1 <= K <= 100) workers should paint a fence which contains N (1 <= N <= 1原创 2017-08-11 10:34:05 · 4464 阅读 · 0 评论 -
POJ-1251-Jungle Roads
POJ-1251-Jungle Roads原创 2017-08-07 23:26:06 · 4212 阅读 · 0 评论 -
POJ-1016-Numbers That Count
POJ-1016-Numbers That Count原创 2017-08-07 23:10:27 · 8815 阅读 · 0 评论 -
POJ-1002-(487-3279)
POJ-1002-(487-3279)原创 2017-08-07 22:34:15 · 4336 阅读 · 0 评论