
poj
文章平均质量分 88
K_y
这个作者很懒,什么都没留下…
展开
-
POj King 1364(差分约束)
KingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12687 Accepted: 4598DescriptionOnce, in one kingdom, there was a queen and that queen was expectin原创 2016-11-23 21:23:12 · 314 阅读 · 0 评论 -
POJ Period 1691(kmp)
PeriodTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 16765 Accepted: 8069DescriptionFor each prefix of a given string S with N characters (each charact原创 2016-10-15 16:11:42 · 252 阅读 · 0 评论 -
POJ Power Strings 2406
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 44948 Accepted: 18770DescriptionGiven two strings a and b we define a*b to be their concate原创 2016-10-15 16:01:09 · 234 阅读 · 0 评论 -
POJ Who Gets the Most Candies? 2886(线段树)
Who Gets the Most Candies?Time Limit: 5000MS Memory Limit: 131072KTotal Submissions: 13876 Accepted: 4385Case Time Limit: 2000MSDescriptionN children are原创 2016-11-06 09:42:41 · 388 阅读 · 0 评论 -
POJ Organize Your Train part II 3007
Organize Your Train part IITime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8277 Accepted: 2369DescriptionRJ Freight, a Japanese railroad company for f原创 2016-10-12 20:27:45 · 837 阅读 · 0 评论 -
POJ Buy Tickets 2828(线段树)
Buy TicketsTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 18841 Accepted: 9352DescriptionRailway tickets were difficult to buy around the Lunar New Y原创 2016-10-12 20:24:07 · 233 阅读 · 0 评论 -
POJ Mayor's posters 2528(线段树+离散化)
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 59647 Accepted: 17287DescriptionThe citizens of Bytetown, AB, could not stand that the ca原创 2016-10-11 19:18:14 · 252 阅读 · 0 评论 -
POJ Balanced Lineup 3264
Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 48372 Accepted: 22684Case Time Limit: 2000MSDescriptionFor the daily milking, Far原创 2016-10-11 16:44:49 · 240 阅读 · 0 评论 -
POJ 3096 Surprising Strings
Surprising StringsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6884 Accepted: 4457DescriptionThe D-pairs of a string of letters are the ordered pai原创 2016-10-09 20:14:16 · 219 阅读 · 0 评论 -
POJ Fishnet 1408(计算几何)
FishnetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 2177 Accepted: 1374DescriptionA fisherman named Etadokah awoke in a very small island. He could s原创 2016-09-22 20:30:35 · 317 阅读 · 0 评论 -
POJ Colored Sticks 2513(字典树+并查集+欧拉回路)
Colored SticksTime Limit: 5000MS Memory Limit: 128000KTotal Submissions: 35376 Accepted: 9264DescriptionYou are given a bunch of wooden sticks. Each endpoint of e原创 2016-08-09 21:20:17 · 322 阅读 · 0 评论 -
POJ Area (pick)
题意:给出一个点阵,上面的点连成了一个多边形,求多边形内部的点,多边形边界上的点,还有多边形的面积注意,给的数是相对上一个点移动距离,也就是这一个点和上一个点的向量分析:1.pick定理,S=a/2+b-1 S是多边形的面积,a是多边形边界上的点的数量,b是多边形内点的数量 2.任意一个多边形的面积等于按顺序求相邻两个点与原点组成的向量的叉积之和 3.多边形边界上点个数等于gcd(x,y) x是相邻两个点横坐标之差的绝对值,y是相邻两点纵坐标之差的绝对值#include原创 2016-08-25 17:14:34 · 274 阅读 · 0 评论 -
POJ 4047 Garden
题意:给出一串数字,和许多操作,当p=0时,x的位置变成y当p=1时,x,y交换当p=2时,输出在区间x,y中最大的连续的长度为k的区间和分析:把1-k当做第一个数 , 2--k+1当做第二个数 .....然后就是一个线段树的区间更新,求区间最大#include #include #include #include using namespace std;原创 2016-09-29 20:41:54 · 249 阅读 · 0 评论 -
POJ Count Color 2777(线段树)
Count ColorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 43739 Accepted: 13237DescriptionChosen Problem Solving and Program design as an optional co原创 2016-10-26 20:22:40 · 253 阅读 · 0 评论 -
POJ 3159 Candies(差分约束)
CandiesTime Limit: 1500MS Memory Limit: 131072KTotal Submissions: 29958 Accepted: 8305DescriptionDuring the kindergarten days, flymouse was the monitor of his原创 2016-11-21 21:10:16 · 250 阅读 · 0 评论 -
POJ Kaka's Matrix Travels 3422 (最小费用最大流)
Kaka's Matrix TravelsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9524 Accepted: 3876DescriptionOn an N × N chessboard with a non-negative number i原创 2016-12-02 21:34:44 · 327 阅读 · 0 评论 -
POJ Going Home (2195)(最小费用最大流)
Going HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 22076 Accepted: 11148DescriptionOn a grid map there are n little men and n houses. In each u原创 2016-11-30 20:15:29 · 276 阅读 · 0 评论 -
POJ Intervals (1201)(差分约束)
IntervalsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 25777 Accepted: 9868DescriptionYou are given n closed, integer intervals [ai, bi] and n integ原创 2016-11-17 16:53:16 · 276 阅读 · 0 评论 -
POJ Power Network 1459(最大流)
Power NetworkTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 27572 Accepted: 14333DescriptionA power network consists of nodes (power stations, consum原创 2016-11-29 20:35:29 · 384 阅读 · 0 评论 -
POJ Y2K Accounting Bug 2586(贪心)
//2586//连续5个月必须是亏的,找出这5个月中至少亏几个月//ct==1 ssssd ssssd ss//ct==2 sssdd sssdd ss//ct==3 ssddd ssddd ss//ct==4 sdddd sdddd sd//ct==5 ddddd ddddd dd#include int main(){ int s,d; int ct;原创 2016-11-12 16:10:58 · 291 阅读 · 0 评论 -
POJ Find them, Catch them 1703 (关系型并查集)
Find them, Catch themTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 42711 Accepted: 13146DescriptionThe police office in Tadu City decides to say ends原创 2016-11-28 21:03:08 · 506 阅读 · 1 评论 -
POJ 1182 食物链 (关系型并查集)
题意就不说了在网上看了好多题解,好多都是用再加一个关系数组,可惜本弱鸡没看懂,找到了一种自己认为还挺好理解的方法。这种方法是:建一个3*N的并查集 1--N 表示同类 比如 pre[ 3 ]=4 ,表示3和4是同类 N+1--N*2 表示这个吃谁 比如 pre[ 2 ] = 1 ,表示2吃1 N*2+1 --N*3 表原创 2016-11-28 20:26:09 · 736 阅读 · 1 评论 -
POJ Mobile phones(1195)(二维树状数组)
Mobile phonesTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 18586 Accepted: 8612DescriptionSuppose that the fourth generation mobile phone base stati原创 2016-11-09 18:27:44 · 304 阅读 · 0 评论 -
POJ Apple Tree (3321)(树状数组+dfs)
Apple TreeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 27309 Accepted: 8098DescriptionThere is an apple tree outside of kaka's house. Every autumn,原创 2016-11-09 18:23:49 · 446 阅读 · 0 评论 -
POJ Strange Way to Express Integers 2891(扩展欧几里得)
Strange Way to Express IntegersTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 14558 Accepted: 4766DescriptionElina is reading a book written by Rujia原创 2016-10-17 21:37:07 · 257 阅读 · 0 评论 -
POJ 青蛙的约会 1061 (扩展欧几里得)
裸的扩展欧几里得,这里有模板点击打开链接#include <stdio.h>#include <string.h>#include <stdlib.h>#include <math.h>#include <algorithm>using namespace std;long long x,y;long long e_gcd(long long a,long long b,long long &x,long long &y){ if(b==0) { x=1原创 2016-08-25 11:29:45 · 250 阅读 · 0 评论 -
POJ C Looooops 2115 (扩展欧几里得)
题意:给出a,b,c,k,算(a+x*c)%2^k是否等于b分析:扩展欧几里得最小整数解 可以把上面的方程转成 a*x + 2^k*y = b如果没有整数解,则永远到不了,套模板,这里有模板点击打开链接#include <stdio.h>#include <string.h>#include <algorithm>#include <math.h>#include <stdlib.h>using namespace std;long long x,y;long long e_gcd(lo原创 2016-08-25 11:25:28 · 253 阅读 · 0 评论 -
POJ Expanding Rods 1905 (二分)
Expanding RodsTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 15285 Accepted: 4071DescriptionWhen a thin rod of length L is heated n degrees, it expan原创 2016-08-25 11:15:52 · 283 阅读 · 0 评论 -
POJ Black Box 1442(优先队列)
Black BoxTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 10302 Accepted: 4237DescriptionOur Black Box represents a primitive database. It can save an in原创 2016-08-09 21:32:42 · 317 阅读 · 0 评论 -
POJ Snowflake Snow Snowflakes 3349 (哈希)
Snowflake Snow SnowflakesTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 38668 Accepted: 10138DescriptionYou may have heard that no two snowflakes are原创 2016-08-19 15:38:28 · 976 阅读 · 0 评论 -
POJ Number Sequence 1019
Number SequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 38143 Accepted: 11036DescriptionA single positive integer i is given. Write a program t原创 2016-08-19 11:35:58 · 330 阅读 · 0 评论 -
POJ Babelfish 2503(map,字典树)
BabelfishTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 40265 Accepted: 17159DescriptionYou have just moved from Waterloo to a big city. The people her原创 2016-08-18 21:24:12 · 400 阅读 · 0 评论 -
POJ Channel Allocation 1129(dfs+四色定理)
Channel AllocationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14514 Accepted: 7391DescriptionWhen a radio station is broadcasting over a very large原创 2016-08-18 15:32:33 · 878 阅读 · 0 评论 -
POJ Hardwood Species 2418(字典树)
Hardwood SpeciesTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 23536 Accepted: 9162DescriptionHardwoods are the botanical group of trees that have bro原创 2016-08-16 21:31:07 · 282 阅读 · 0 评论 -
POJ Balance 1837(01背包)
BalanceTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 13585 Accepted: 8518DescriptionGigel has a strange "balance" and he wants to poise it. Actually,原创 2016-08-16 21:21:23 · 268 阅读 · 0 评论 -
POJ Cash Machine 1276(多重背包)
Cash MachineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 32926 Accepted: 11929DescriptionA Bank plans to install a machine for cash withdrawal. The mac原创 2016-08-16 20:31:32 · 245 阅读 · 0 评论 -
poj 3295 Tautology(构造法)
TautologyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11792 Accepted: 4467DescriptionWFF 'N PROOF is a logic game played with dice. Each die has si原创 2016-07-27 18:01:48 · 286 阅读 · 0 评论 -
poj 1611 The Suspects(并查集)
The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 33063 Accepted: 16027DescriptionSevere acute respiratory syndrome (SARS), an atypical pneu原创 2016-07-27 19:12:18 · 217 阅读 · 0 评论 -
poj 2299 Ultra-QuickSort (归并求逆序数)
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 54525 Accepted: 20039DescriptionIn this problem, you have to analyze a particular sorti原创 2016-07-27 21:12:37 · 273 阅读 · 0 评论 -
POJ Pie 3122 (二分)
PieTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15441 Accepted: 5286 Special JudgeDescriptionMy birthday is coming up and traditionally I'm serving原创 2016-08-22 10:39:00 · 209 阅读 · 0 评论