![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
poj
DATELOST
I'm curious.
展开
-
POJ-3074 Dancing Links精确覆盖
题目行(所有情况)81个格子 * 9个数字=9^3列(限制条件)1.每个格子放一个数-812.行限制-9行 * 9个数字3.列限制-9列 * 9个数字4.小宫格限制-9个小宫格 * 9个数字把限制条件插入,dancing…剪枝:先选择数字多的列#include<stdio.h>#include<string.h>using namespace std...原创 2020-03-21 21:57:48 · 172 阅读 · 0 评论 -
POJ-2104 主席树板子
DescriptionYou are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to...原创 2020-01-13 23:27:21 · 168 阅读 · 0 评论 -
POJ-2417 Baby-Step Giant-Step
DescriptionGiven a prime P, 2 <= P < 2 ^ 31, an integer B, 2 <= B < P, and an integer N, 1 <= N < P, compute the discrete logarithm of N, base B, modulo P. That is, find an integer ...原创 2020-01-10 23:45:54 · 170 阅读 · 0 评论 -
POJ-2002 hash_map
DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about its centre by 90 degrees gives the same ...原创 2019-10-13 10:55:54 · 92 阅读 · 0 评论 -
POJ-2600 模拟退火
DescriptionThere is a polygon A1A2…An (the vertices Ai are numbered in the clockwise order). On each side AiAi+1 an isosceles triangle AiMiAi+1 is built on the outer side of the polygon, and angle Ai...原创 2019-10-12 19:40:32 · 148 阅读 · 0 评论 -
POJ-1118 极角排序 尺取
Description“How am I ever going to solve this problem?” said the pilot.Indeed, the pilot was not facing an easy task. She had to drop packages at specific points scattered in a dangerous area. Furth...原创 2019-10-12 12:03:05 · 95 阅读 · 0 评论 -
POJ-3322 bfs
DescriptionLittle Tom loves playing games. One day he downloads a little computer game called ‘Bloxorz’ which makes him excited. It’s a game about rolling a box to a specific position on a special pl...原创 2019-08-22 19:47:53 · 221 阅读 · 0 评论 -
POJ-2442 二叉堆
DescriptionGiven m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It’s clear that we may get n ^ m this kind of s...原创 2019-08-12 13:59:27 · 234 阅读 · 0 评论 -
POJ-2248 迭代加深搜索
DescriptionAn addition chain for n is an integer sequence with the following four properties:a0 = 1am = na0 < a1 < a2 < … < am-1 < amFor each k (1<=k<=m) there exist two (not...原创 2019-08-15 17:48:03 · 127 阅读 · 0 评论 -
POJ-1456 二叉堆
题目小根堆#include<iostream>#include<stdio.h>#include<string.h>#include<vector>#include<algorithm>#define op < //小根堆using namespace std;typedef long long ll;con...原创 2019-08-11 13:05:48 · 103 阅读 · 0 评论 -
POJ-3764 01-Trie
DescriptionIn an edge-weighted tree, the xor-length of a path p is defined as the xor sum of the weights of edges on p:http://poj.org/problem?id=3764⊕ is the xor operator.We say a path the xor-lon...原创 2019-08-10 22:46:04 · 92 阅读 · 0 评论 -
POJ-3694 tarjan 割边 并查集缩点
DescriptionA network administrator manages a large network. The network consists of N computers and M links between pairs of computers. Any pair of computers are connected directly or indirectly by s...原创 2019-07-27 23:58:26 · 171 阅读 · 0 评论 -
POJ-3585 树形dp 换根法
题目#include<iostream>#include<vector>#include<stdio.h>#include<string.h>#define P(i,j) make_pair(i,j)using namespace std;typedef long long ll;const int N=2e5+5;int t,n,...原创 2019-07-23 10:57:19 · 174 阅读 · 0 评论 -
POJ-1915 双向bfs
DescriptionBackgroundMr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him?The ProblemYour task is to ...原创 2019-08-26 12:40:44 · 239 阅读 · 0 评论 -
POJ-2449 A* bfs
Description“Good man never makes girls wait or breaks an appointment!” said the mandarin duck father. Softly touching his little ducks’ head, he told them a story.“Prince Remmarguts lives in his kin...原创 2019-08-27 23:58:16 · 119 阅读 · 0 评论 -
POJ-1456 贪心并查集
题目优先卖利润大的,并且在过期前尽量晚地卖出建立关于天数的并查集:维护未被占用的最晚的一天对于每个商品,在d天过期,查询d的根节点r在r天卖出,合并r, r-1#include<iostream>#include<vector>#include<stdio.h>#include<algorithm>#include<strin...原创 2019-08-30 18:53:33 · 107 阅读 · 0 评论 -
POJ-1733 边带权并查集
DescriptionNow and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a continuous subsequence (for example the subsequenc...原创 2019-09-03 23:52:17 · 248 阅读 · 0 评论 -
POJ-1182 拓展域并查集
Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是"2 X Y",表示X吃Y。此人对N个动物,用上述两种说法,一句接一...原创 2019-09-04 22:47:13 · 149 阅读 · 0 评论 -
POJ-1039 判断相交计算交点
DescriptionThe GX Light Pipeline Company started to prepare bent pipes for the new transgalactic light pipeline. During the design phase of the new pipe shape the company ran into the problem of dete...原创 2019-09-10 20:42:41 · 183 阅读 · 0 评论 -
POJ-1873 凸包
DescriptionOnce upon a time, in a faraway land, there lived a king. This king owned a small collection of rare and valuable trees, which had been gathered by his ancestors on their travels. To protec...原创 2019-09-12 23:07:47 · 147 阅读 · 0 评论 -
POJ-1265 pick定理
题目给定顶点坐标均是整点(或正方形格点)的简单多边形,皮克定理说明了其面积S和内部格点数目n、边上格点数目s的关系:#include<iostream>#include<string.h>#include<math.h>#include<stdio.h>#include<algorithm>#include<vect...原创 2019-09-13 00:44:00 · 139 阅读 · 0 评论 -
POJ-3525 半平面交,二分答案
DescriptionThe main land of Japan called Honshu is an island surrounded by the sea. In such an island, it is natural to ask a question: “Where is the most distant point from the sea?” The answer to t...原创 2019-09-13 14:52:08 · 157 阅读 · 0 评论 -
POJ-1755 半平面交解决 判断不等式组有解
#include<iostream>#include<string.h>#include<math.h>#include<stdio.h>#include<algorithm>#include<vector>using namespace std;const int N=1e3+7;const int maxp...原创 2019-09-16 00:05:55 · 223 阅读 · 0 评论 -
POJ-3190 贪心
DescriptionOh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A…B (1 <= A <= B <= 1,000,000), which includes ...原创 2019-07-31 20:43:47 · 124 阅读 · 0 评论 -
POJ-2763 树链剖分 线段树 边权
题目把边权看作点权不知道为啥N=1e5+5会wa,数组要开大点#include<iostream>#include<string.h>#include<stdio.h>using namespace std;const int N=2e5+5;int fa[N],son[N],dep[N],top[N],siz[N],pos[N],fp[N];...原创 2019-07-22 10:59:30 · 132 阅读 · 0 评论 -
POJ-2559 单调栈
题目单调栈:及时排除不可能的选项,保持决策集合的有效性和秩序性#include<iostream>#include<iomanip>#include<vector>#include<stack>#define P(i,j) make_pair(i,j)using namespace std;typedef long long ll;...原创 2019-08-02 17:54:30 · 188 阅读 · 0 评论 -
POJ-2653 线段相交 排斥跨立实验
DescriptionStan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such that ...原创 2019-04-08 15:04:32 · 92 阅读 · 0 评论 -
POJ-3264 RMQ倍增求极值
DescriptionFor the daily milking, Farmer John’s N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To ...原创 2019-03-29 00:04:40 · 116 阅读 · 0 评论 -
POJ-1556 判断相交+dijkstra
DescriptionYou are to find the length of the shortest path through a chamber containing obstructing walls. The chamber will always have sides at x = 0, x = 10, y = 0, and y = 10. The initial and fina...原创 2019-04-07 20:47:34 · 98 阅读 · 0 评论 -
POJ-1679 kruskal算法 最小生成树唯一?
DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a ...原创 2019-03-27 22:59:55 · 519 阅读 · 0 评论 -
POJ-1269 直线交点
DescriptionWe all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, ...原创 2019-04-06 12:29:49 · 98 阅读 · 0 评论 -
POJ-2826 求交点与面积
DescriptionIt’s raining outside. Farmer Johnson’s bull Ben wants some rain to water his flowers. Ben nails two wooden boards on the wall of his barn. Shown in the pictures below, the two boards on th...原创 2019-04-10 16:36:08 · 163 阅读 · 0 评论 -
POJ-3304 判断线段与直线相交
DescriptionGiven n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments have at leas...原创 2019-04-05 17:57:42 · 123 阅读 · 0 评论 -
POJ-3279 状压 搜索
DescriptionFarmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid(1 ≤ M ≤ 15...原创 2019-03-17 23:56:45 · 269 阅读 · 0 评论 -
POJ-2318 叉积判断点在直线上下方
DescriptionCalculate the number of toys that land in each bin of a partitioned toy box.Mom and dad have a problem - their child John never puts his toys away when he is finished playing with them. T...原创 2019-03-13 23:19:31 · 390 阅读 · 0 评论 -
POJ-2976 01 分数规划
DescriptionIn a certain course, you take n tests. If you get ai out of bi questions correct on test i, your cumulative average is defined to be Given your test scores and a positive integer k, det...原创 2019-02-20 19:58:30 · 176 阅读 · 0 评论 -
POJ-1696 Graham_scan求凸包
DescriptionThe most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y1999 and called it M11. It has only one eye o...原创 2019-04-09 23:20:57 · 122 阅读 · 0 评论 -
POJ-1006 中国剩余定理(CRT)
DescriptionSome people believe that there are three cycles in a person’s life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they h...原创 2019-04-17 20:00:25 · 166 阅读 · 0 评论 -
POJ-3693 后缀数组 lcp
DescriptionThe repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For example, the repetition number of “abab...原创 2019-07-17 22:11:29 · 119 阅读 · 0 评论 -
POJ-3261 后缀数组 对height分组 二分
DescriptionFarmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he can’t predict the quality of milk from o...原创 2019-07-16 14:57:42 · 94 阅读 · 0 评论