POJ
文章平均质量分 80
_OTTFF
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ_2392_SpaceElevator(多重背包)
Space ElevatorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10883 Accepted: 5185DescriptionThe cows are going to space! They plan to achieve orbit by原创 2016-07-31 17:20:27 · 708 阅读 · 0 评论 -
POJ_3281_Dining
DiningTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 12800 Accepted: 5866DescriptionCows are such finicky eaters. Each cow has a preference for certa原创 2016-02-15 17:33:56 · 411 阅读 · 0 评论 -
POJ_2366_SacramentOfTheSum
题目本身不难但是卡了好久。因为一个break。说明以后在有输入输出的循环里加break要格外注意。用了二分搜索法,不过这个题目还可以hash。之后补充hash。#include #includeusing namespace std;const int M=50005;int s1[M];int bs(int n,int key){ int lo=0,hi=原创 2015-07-21 16:48:51 · 627 阅读 · 0 评论 -
POJ_1562_ZOJ_1709_OilDeposits
油田,经典的bfs调用bfs次数就是油田的片数感觉还能优化貌似调用过的油田直接改回非油田就好了不用再开数组标记了#include #include #include using namespace std;const int M=105;char ti[M][M];int isu[M][M];int dx[8]={-1,0,1,1,1,0,-1,-1};int原创 2015-07-25 09:07:57 · 400 阅读 · 0 评论 -
POJ_3126_PrimePath
bfs这个题目就麻烦在数字是按位变化的,所以要把数字拆开……#include #include #include using namespace std;const int M=10005;int pri[M];int prim[11][10][10][10]; //拆开的素数int isu[M];queuere;void bfs(int n,int原创 2015-07-25 08:59:35 · 354 阅读 · 0 评论 -
POJ_1915_KnightMoves
bfs就是跟马的运动方式一样么……#include #include #include using namespace std;const int M=305;int isu[M][M];int dx[8]={-2,-1,1,2,2,1,-1,-2};int dy[8]={-1,-2,-2,-1,1,2,2,1};queuere;int tot;void b原创 2015-07-25 08:55:28 · 452 阅读 · 0 评论 -
POJ_1050_ToTheMax
To the MaxTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 43794 Accepted: 23206DescriptionGiven a two-dimensional array of positive and negative integ原创 2015-08-17 14:04:20 · 476 阅读 · 0 评论 -
POJ_2096_CollectingBugs
Collecting BugsTime Limit: 10000MS Memory Limit: 64000KTotal Submissions: 3427 Accepted: 1695Case Time Limit: 2000MS Special JudgeDescriptionIvan is fond原创 2015-08-04 23:16:43 · 729 阅读 · 0 评论 -
POJ_2676_Sudoku
数独,当年一家人都很疯狂的玩如今用电脑dfs非常容易的就解决了。判断在同一大格里可以填有点麻烦。题目每组输入其实是9个整数,所以……另外就是题目要求对于有多个解的题目,输出一个可行解。#include #include using namespace std;int ss[9]; //输入这里也卡了一下int s[9][9];原创 2015-07-23 18:36:23 · 382 阅读 · 0 评论 -
POJ_3436_ACM_ComputerFactory
ACM Computer FactoryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6422 Accepted: 2263 Special JudgeDescriptionAs you know, all the computers use原创 2016-02-15 17:47:37 · 602 阅读 · 0 评论 -
POJ_2485_Highways
HighwaysTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 26862 Accepted: 12295DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately原创 2016-02-20 21:52:38 · 344 阅读 · 0 评论 -
HDU_1686_POJ_3461_Oulipo
OulipoTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8752 Accepted Submission(s): 3534Problem DescriptionThe French author G原创 2016-02-21 21:35:22 · 341 阅读 · 0 评论 -
POJ_2486_AppleTree(树状DP&&01背包)
Apple TreeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9584 Accepted: 3192DescriptionWshxzt is a lovely girl. She likes apple very much. One day HX t原创 2016-07-31 16:47:32 · 912 阅读 · 0 评论 -
POJ_1276_ZOJ_1366_CashMachine(多重背包)
Cash MachineTime Limit: 10 Seconds Memory Limit: 32768 KBA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate bills for a requested cash amo原创 2015-08-01 22:14:01 · 468 阅读 · 0 评论 -
POJ_1787_Charlie'sChange(多重背包&&记录路径)
Charlie's ChangeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 4094 Accepted: 1269DescriptionCharlie is a driver of Advanced Cargo Movement, Ltd. Charl原创 2016-07-31 16:28:37 · 536 阅读 · 0 评论 -
LA_2659_POJ_3076_ZOJ_3122_Sudoku(DancingLinksX精确覆盖,数独题模板)
SudokuTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 4918 Accepted: 2332DescriptionA Sudoku grid is a 16x16 grid of cells grouped in sixteen 4x4 squ原创 2016-05-01 10:38:44 · 1194 阅读 · 0 评论 -
POJ_3074_Sudoku(DancingLinksX精确覆盖)
SudokuTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9412 Accepted: 3375DescriptionIn the game of Sudoku, you are given a large 9 × 9 grid divided in原创 2016-05-01 00:31:03 · 428 阅读 · 0 评论 -
POJ_1084_SquareDestroyer(DancingLinksX重复覆盖)
Square DestroyerTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 3642 Accepted: 1577DescriptionThe left figure below shows a complete 3*3 grid made wit原创 2016-05-01 00:12:18 · 448 阅读 · 0 评论 -
POJ_2299_Ultra-QuickSort
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 48763 Accepted: 17823DescriptionIn this problem, you have to analyze a particular sorti原创 2015-08-17 13:48:05 · 379 阅读 · 0 评论 -
POJ_2406_PowerStrings
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 40456 Accepted: 16833DescriptionGiven two strings a and b we define a*b to be their conca原创 2016-02-21 21:41:22 · 363 阅读 · 0 评论 -
POJ_3258_RiverHopscotch
这个问题最开始没看出是二分的问题。启发就是很多需要搜索答案的问题可能是用二分的方法来求解。答案所求就是二分的量。拿掉石子时优先从一侧挨着拿直到符合条件。#include #include #include using namespace std;const int M=50005;int d[M];int ns(int k,int n){ int co原创 2015-07-23 11:06:54 · 368 阅读 · 0 评论 -
POJ_3104_Drying
二分查找的问题题意为n衣服有a滴水,烘干每分钟为k滴 不烘干为每分钟1滴问衣服干的最短时间。注意一个是这个题最后求得是整数分钟,因此过程中要用ceil来向上取整求衣服烘所需要的时间另外问题要用long long 不然会wa#include #include #include using namespace std;typedef long long LL;co原创 2015-07-23 14:17:01 · 325 阅读 · 0 评论 -
POJ_1651_MultiplicationPuzzle
Multiplication PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7071 Accepted: 4354DescriptionThe multiplication puzzle is played with a row of c原创 2015-08-02 16:28:08 · 809 阅读 · 0 评论 -
POJ_1426_FindTheMultiple
Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 21478 Accepted: 8797 Special JudgeDescriptionGiven a positive integer n, write a pr原创 2015-07-29 08:44:26 · 384 阅读 · 0 评论 -
POJ_2752_SeekTheName,SeekTheFame
Seek the Name, Seek the FameTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14394 Accepted: 7186DescriptionThe little cat is so famous, that many coup原创 2015-08-24 16:14:00 · 402 阅读 · 0 评论 -
POJ_3080_BlueJeans
Blue JeansTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14291 Accepted: 6361DescriptionThe Genographic Project is a research partnership between IBM原创 2015-08-17 14:50:47 · 387 阅读 · 0 评论 -
POJ_2352_Stars
StarsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 37221 Accepted: 16231DescriptionAstronomers often examine star maps where stars are represented by po原创 2015-08-10 00:19:11 · 476 阅读 · 0 评论 -
POJ_1470_ClosestCommonAncestors
Closest Common AncestorsTime Limit: 2000MS Memory Limit: 10000KTotal Submissions: 17232 Accepted: 5525DescriptionWrite a program that takes as input a rooted tree a原创 2015-08-10 00:25:34 · 454 阅读 · 0 评论 -
POJ_2029_GetManyPersimmonTrees
Get Many Persimmon TreesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 3922 Accepted: 2553DescriptionSeiji Hayashi had been a professor of the Nisshinkan原创 2015-08-09 23:30:04 · 361 阅读 · 0 评论 -
POJ_2362_Square
SquareTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 21782 Accepted: 7606DescriptionGiven a set of sticks of various lengths, is it possible to join th原创 2015-07-29 08:57:51 · 351 阅读 · 0 评论 -
LA_3027_POJ_1962_CorporativeNetwork
3027 - Corporative NetworkTime limit: 3.000 secondsA very big corporation is developing its corporative network. In the beginning each of the N enterprises of the corporation, numerated from 1 to原创 2015-08-10 00:09:17 · 396 阅读 · 0 评论 -
POJ_1182_食物链
食物链Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 53514 Accepted: 15677Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动原创 2015-08-11 16:14:27 · 385 阅读 · 0 评论 -
POJ_2260_ErrorCorrection
Error CorrectionTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5920 Accepted: 3823DescriptionA boolean matrix has the parity property when each row a原创 2015-07-30 10:47:18 · 380 阅读 · 0 评论 -
POJ_1068_Parencodings
ParencodingsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 22987 Accepted: 13469DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses原创 2015-07-30 10:52:33 · 309 阅读 · 0 评论 -
POJ_1995_RaisingModuloNumbers
没什么特别的,简单的快速幂,照着output中公式写即可#include #includeusing namespace std;int qp(int nn,int n,int m) //nn的n次幂模m{ int r=1; while(n>0) { if(n&1) r=(r*nn)%m; n>>=1原创 2015-07-23 09:18:24 · 301 阅读 · 0 评论 -
POJ_2955_Brackets
BracketsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4204 Accepted: 2230DescriptionWe give the following inductive definition of a “regular brack原创 2015-08-02 16:33:30 · 339 阅读 · 0 评论 -
POJ_1458_CommonSubsequence
Common SubsequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 42953 Accepted: 17377DescriptionA subsequence of a given sequence is the given seque原创 2015-07-31 18:02:52 · 355 阅读 · 0 评论 -
POJ_1008_MayaCalendar
直接模拟即可。题目比较长。#include #include #include using namespace std;char hmn[19][10]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kanki原创 2015-07-20 11:18:54 · 344 阅读 · 0 评论 -
POJ_3414_Pots
PotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11767 Accepted: 4981 Special JudgeDescriptionYou are given two pots, having the volume of A an原创 2015-07-31 17:07:20 · 370 阅读 · 0 评论 -
POJ_2709_Painter
PainterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3725 Accepted: 2252DescriptionThe local toy store sells small fingerpainting kits with between原创 2015-07-31 17:03:53 · 934 阅读 · 0 评论
分享