
POJ
文章平均质量分 86
Mr_Treeeee
这个作者很懒,什么都没留下…
展开
-
POJ 3685 - Matrix (二分的二分)
http://poj.org/problem?id=3685题意:给你n*n的矩阵,每个元素(i,j)=.给你n,m,问你在n*n的矩阵里第m小的元素是多少。 POINT:可知,确定了j=k之后,元素(i,k)具有单调性,i越大,元素越大。所以我们二分答案,然后for循环遍历j,二分确定一个i是<=答案的。就知道对于这个j有 i个元素小于答案。把他们累加起来,...原创 2018-07-27 23:18:08 · 247 阅读 · 0 评论 -
POJ 3667 - Hotel (线段树 区间更新)
HotelTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 18479 Accepted: 8040DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultu原创 2017-11-06 12:32:50 · 457 阅读 · 0 评论 -
POJ 3111 - K Best(最大化平均值)
K BestTime Limit: 8000MS Memory Limit: 65536KTotal Submissions: 11555 Accepted: 2978Case Time Limit: 2000MS Special JudgeDescriptionDemy has n jewel原创 2017-11-02 22:59:59 · 343 阅读 · 0 评论 -
POJ 3414 - Pots (DFS)
PotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 19042 Accepted: 8027 Special JudgeDescriptionYou are given two pots, having the volume of A and原创 2017-11-02 22:57:12 · 273 阅读 · 0 评论 -
POJ 1035 Spell checker (模拟)
Spell checkerTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 26092 Accepted: 9561DescriptionYou, as a member of a development team for a new spell check原创 2017-11-09 21:16:06 · 275 阅读 · 0 评论 -
POJ 3280 - Cheapest Palindrome(区间DP)
Cheapest PalindromeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 10863 Accepted: 5196DescriptionKeeping track of all the cows can be a tricky task so原创 2017-10-27 20:44:54 · 269 阅读 · 0 评论 -
POJ 2955 - Brackets(区间DP)
BracketsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9255 Accepted: 4947DescriptionWe give the following inductive definition of a “regular bracket原创 2017-10-27 20:41:57 · 212 阅读 · 0 评论 -
POJ 2406 - Power Strings(KMP)
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 51899 Accepted: 21642DescriptionGiven two strings a and b we define a*b to be their concate原创 2017-10-01 16:54:07 · 688 阅读 · 0 评论 -
POJ 3694 Network(tarjan+lca)
NetworkTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 10463 Accepted: 3899DescriptionA network administrator manages a large network. The network consists of N computers and M links between...原创 2017-09-20 12:40:09 · 381 阅读 · 0 评论 -
POJ 1679 The Unique MST(次小生成树)
The Unique MSTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 31994 Accepted: 11572DescriptionGiven a connected undirected graph, tell if its minimum sp原创 2017-09-08 17:48:47 · 258 阅读 · 0 评论 -
POJ 3261 - Milk Patterns (可重叠的k次最长重复子串 后缀数组)
Milk PatternsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 16432 Accepted: 7254Case Time Limit: 2000MSDescriptionFarmer John has noticed that th原创 2017-09-27 22:56:51 · 347 阅读 · 0 评论 -
POJ - 3139 Balancing the Scale (状态压缩+链表)
Balancing the ScaleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1673 Accepted: 645DescriptionYou are given a strange scale (see the figure below),原创 2017-11-06 12:40:44 · 563 阅读 · 0 评论 -
POJ 1835 - 宇航员 (模拟)
宇航员Time Limit: 2000MS Memory Limit: 30000KTotal Submissions: 6542 Accepted: 2805Description问题描述: 宇航员在太空中迷失了方向,在他的起始位置现在建立一个虚拟xyz坐标系,称为绝对坐标系,宇航员正面的方向为x轴正方向,头顶方原创 2017-11-21 21:54:53 · 441 阅读 · 0 评论 -
POJ 2443 - Set Operation (bitset)
http://poj.org/problem?id=2443 题意:给你n个集合(n<=1000),n个集合里有很多数x(1<=x<=10000),可以重复。每次问你a和b,问你能不能在某个集合中既找到a又找到b。 POINT:有两种思路,不过都是状态压缩bitset。1.对每一个数字压缩存在于哪些集合。对两个数字的存在状态&一下,如...原创 2018-07-27 23:09:07 · 269 阅读 · 0 评论 -
POJ 1651 - Multiplication Puzzle (区间DP)
Multiplication PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12296 Accepted: 7508DescriptionThe multiplication puzzle is played with a row of cards, each containing a single positive...原创 2018-05-01 13:45:15 · 170 阅读 · 0 评论 -
POJ 1830 - 开关问题 (高斯消元)
开关问题Time Limit: 1000MS Memory Limit: 30000KTotal Submissions: 9787 Accepted: 3930Description有N个相同的开关,每个开关都与某些开关有着联系,每当你打开或者关闭某个开关的时候,其他的与此开关相关联的开关也会相应地发生变化,即这些相联系的开关的状态如果原来为开就变为关,如果为关就变为开。你的目标是经过若干次开关...原创 2018-03-22 12:40:04 · 281 阅读 · 0 评论 -
POJ 1222 - EXTENDED LIGHTS OUT (高斯消元)
EXTENDED LIGHTS OUTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12731 Accepted: 8065DescriptionIn an extended version of the game Lights Out, is a puzzle with 5 rows of 6 buttons each (th...原创 2018-03-22 12:38:33 · 216 阅读 · 0 评论 -
POJ 3728 - The merchant (LCA)
The merchantTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 5658 Accepted: 1949DescriptionThere are N cities in a country, and there is one and only one simple path between each pair of citi...原创 2018-03-25 10:53:55 · 239 阅读 · 0 评论 -
POJ 3417 - Network (LCA+DP)
NetworkTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5627 Accepted: 1595DescriptionYixght is a manager of the company called SzqNetwork(SN). Now she's very worried because she has just rec...原创 2018-03-25 10:50:14 · 210 阅读 · 0 评论 -
POJ 3255 - Roadblocks(次短路)
RoadblocksTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16533 Accepted: 5829DescriptionBessie has moved to a small farm and sometimes enjoys returning原创 2017-11-27 11:09:14 · 305 阅读 · 0 评论 -
POJ 3083 - Children of the Candy Corn (DFS+BFS)
Children of the Candy CornTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14380 Accepted: 6205DescriptionThe cornfield maze is a popular Halloween treat原创 2017-11-21 22:06:17 · 259 阅读 · 0 评论 -
POJ 3254 - Corn Fields (状压DP)
Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 17014 Accepted: 8987DescriptionFarmer John has purchased a lush new rectangular pasture compo原创 2017-11-21 22:02:52 · 249 阅读 · 0 评论 -
POJ 3087 - Shuffle'm Up (模拟)
Shuffle'm UpTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12738 Accepted: 5900DescriptionA common pastime for poker players at a poker table is to shu原创 2017-11-21 21:57:25 · 384 阅读 · 0 评论 -
POJ 1743 Musical Theme(不可重叠最长重复子串 后缀数组)
Musical ThemeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 30961 Accepted: 10341DescriptionA musical melody is represented as a sequence of N (1<=N<=2原创 2017-09-27 22:13:51 · 473 阅读 · 1 评论 -
POJ 3281 Dining(网络流建模)
DiningTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 19277 Accepted: 8599DescriptionCows are such finicky eaters. Each cow has a preference for certa原创 2017-09-01 18:48:31 · 320 阅读 · 0 评论 -
POJ 2774 Long Long Message(后缀数组)
Long Long MessageTime Limit: 4000MS Memory Limit: 131072KTotal Submissions: 31854 Accepted: 12853Case Time Limit: 1000MSDescriptionThe little cat is majorin原创 2017-09-26 23:35:29 · 276 阅读 · 0 评论 -
POJ 1961 Period(next数组求循环节)
PeriodTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 18549 Accepted: 9013DescriptionFor each prefix of a given string S with N characters (each chara原创 2017-08-20 17:10:06 · 295 阅读 · 0 评论 -
POJ 2402 Palindrome Numbers
Palindrome NumbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3943 Accepted: 1502DescriptionA palindrome is a word, number, or phrase that reads t原创 2017-08-05 17:34:14 · 314 阅读 · 0 评论 -
POJ 1511 Invitation Cards (SPFA+反向建图)
Invitation CardsTime Limit : 10000/5000ms (Java/Other) Memory Limit : 65536/65536K (Java/Other)Total Submission(s) : 36 Accepted Submission(s) : 17Font: Times New Roman | Verdana | Geo原创 2017-05-02 19:25:22 · 430 阅读 · 0 评论 -
POJ 3369 Grocery store (枚举 打表)
Grocery storeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1564 Accepted: 621 Special JudgeDescriptionA cashier in a grocery store seems to have d原创 2017-05-23 18:25:58 · 691 阅读 · 0 评论 -
POJ 1129 Channel Allocation (暴力搜索)
Channel AllocationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 16033 Accepted: 8127DescriptionWhen a radio station is broadcasting over a very large原创 2017-07-15 20:48:34 · 348 阅读 · 0 评论 -
POJ 2796 Feel Good(单调栈)
Feel GoodTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 15264 Accepted: 4216Case Time Limit: 1000MS Special JudgeDescriptionBill is develop原创 2017-08-12 18:10:14 · 322 阅读 · 0 评论 -
POJ 3233 Matrix Power Series (矩阵快速幂+等比数列二分求和)
Matrix Power SeriesTime Limit: 3000MS Memory Limit: 131072KTotal Submissions: 23205 Accepted: 9669DescriptionGiven a n × n matrix A and a positive integer k, fi原创 2017-07-20 12:09:18 · 434 阅读 · 0 评论 -
HDU 1541 & POJ 2352 Stars (树状数组)
StarsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9874 Accepted Submission(s): 3959Problem DescriptionAstronomers often ex原创 2017-07-25 21:51:04 · 313 阅读 · 0 评论 -
POJ 2528 Mayor's posters (线段树 区间更新+离散化)
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 65645 Accepted: 18967DescriptionThe citizens of Bytetown, AB, could not stand that the ca原创 2017-07-22 21:36:39 · 463 阅读 · 0 评论 -
POJ 3468 A Simple Problem with Integers (线段树 区间共加)
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 112230 Accepted: 34906Case Time Limit: 2000MSDescriptionYou have N原创 2017-07-21 17:53:03 · 245 阅读 · 0 评论 -
POJ 2155 Matrix(二维树状数组)
MatrixTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 28817 Accepted: 10507DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j]原创 2017-08-06 16:43:52 · 367 阅读 · 0 评论 -
POJ 1905 Expanding Rods(二分搜索)
Expanding Rods Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 17687 Accepted: 4716 Description When a thin rod of length L is heated n deg...原创 2017-08-22 10:26:26 · 259 阅读 · 0 评论 -
UVA 12338 - Anti-Rhyme Pairs(后缀数组+RMQ)
UVA - 12338 可点击。题意:给你n个字符串,q个查询,每个查询问两个字符串的最长公共前缀是几。POINT:后缀数组,把几个字符串合起来。然后RMQ heght数组。注意答案不能超过min(两个字符串的长度)。先给ans赋值一个上限。在去query查询。#include #include #include #include #incl原创 2017-09-26 23:42:45 · 344 阅读 · 0 评论 -
POJ 3692 Kindergarten (补图的最大独立集||匈牙利算法)
KindergartenTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 7291 Accepted: 3590DescriptionIn a kindergarten, there are a lot of kids. All girls of the原创 2017-08-29 22:09:16 · 432 阅读 · 0 评论