poj
北大oj
DeterminedDiligent
这个作者很懒,什么都没留下…
展开
-
poj 3061 Subsequence
DescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal leng原创 2015-06-20 13:00:09 · 339 阅读 · 0 评论 -
poj1936 All in All
DescriptionYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we w原创 2015-07-23 15:56:07 · 288 阅读 · 0 评论 -
Lotto POJ2245【全排列问题】
Problem DescriptionIn the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although it doesn't increase your chance of winning - is to select原创 2015-08-04 20:18:02 · 605 阅读 · 0 评论 -
Genealogical tree POJ 2367【拓扑排序】
Genealogical treeSpecial JudgeProblem DescriptionThe system of Martians' blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gather t原创 2015-08-18 21:07:57 · 495 阅读 · 0 评论 -
Wormholes POJ 3259【SPFA】
http://poj.org/problem?id=3259DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that原创 2015-08-20 12:07:16 · 747 阅读 · 0 评论 -
Ants POJ 1852
DescriptionAn army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it immediatelly falls off it. When two ant原创 2015-08-21 11:36:04 · 617 阅读 · 0 评论 -
Building a Space Station POJ 2031 【最小生成树 prim】
http://poj.org/problem?id=2031DescriptionYou are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write原创 2015-08-23 00:27:06 · 822 阅读 · 0 评论 -
约瑟夫问题
http://bailian.openjudge.cn/practice/2746/2746:约瑟夫问题查看提交统计提示提问总时间限制: 1000ms 内存限制: 65536kB描述约瑟夫问题:有n只猴子,按顺时针方向围成一圈选大王(编号从1到n),从第1号开始报数,一直数到m,数到m的猴子退出圈外,剩下的猴子再接着从1开始报数。就这样,原创 2015-11-28 19:15:09 · 392 阅读 · 0 评论 -
Eeny Meeny Moo 【 约瑟夫问题】
http://poj.org/problem?id=2244Eeny Meeny MooTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3336 Accepted: 2312DescriptionSurely you have made原创 2015-11-28 19:26:19 · 429 阅读 · 0 评论 -
POJ 2229 Sumsets 【规律题】
http://poj.org/problem?id=2229DescriptionFarmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an integer原创 2015-12-20 14:14:58 · 516 阅读 · 0 评论 -
POJ 3187 Backward Digit Sums
http://poj.org/problem?id=3187Backward Digit SumsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5684 Accepted: 3293DescriptionFJ and his原创 2016-03-08 20:39:37 · 224 阅读 · 0 评论 -
POJ 3061 Subsequence
http://poj.org/problem?id=3061SubsequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10903 Accepted: 4513DescriptionA sequence of N positi原创 2016-03-08 20:45:32 · 268 阅读 · 0 评论 -
POJ 2229 Sumsets
http://poj.org/problem?id=2229SumsetsTime Limit: 2000MS Memory Limit: 200000KTotal Submissions: 15492 Accepted: 6165DescriptionFarmer John commanded his原创 2016-03-08 20:53:25 · 305 阅读 · 0 评论 -
The Suspects poj 1611 【并查集】
DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best s原创 2015-08-13 15:49:39 · 325 阅读 · 0 评论 -
Sum It Up POJ 1564 HDU 杭电1258【DFS】
Problem DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4, n=6, and the list is [4,3,2,2,1,1],原创 2015-08-13 10:30:06 · 963 阅读 · 0 评论 -
poj3253 Fence Repair【哈夫曼树+优先队列】
DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer len原创 2015-08-01 17:29:23 · 624 阅读 · 0 评论 -
Power Strings POJ 2406【KMP Next的应用】
DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponenti原创 2015-08-07 16:58:55 · 341 阅读 · 0 评论 -
POJ 1995 Raising Modulo Numbers 【快速幂&&同余定理】
http://poj.org/problem?id=1995DescriptionPeople are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like usin原创 2015-08-23 20:03:55 · 594 阅读 · 0 评论 -
POJ 1328 南阳oj 287 Radar【区间选点问题】
描述 Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on t原创 2015-05-31 19:56:21 · 610 阅读 · 0 评论 -
Tiling POJ 2506 【大数】
http://poj.org/problem?id=2506DescriptionIn how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles? Here is a sample tiling of a 2x17 rectangle. InputInput is a seq原创 2015-08-23 21:05:17 · 814 阅读 · 3 评论 -
Palindrome POJ 1159 【LCS】
Problem DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determ原创 2015-08-10 17:53:04 · 402 阅读 · 0 评论 -
Seek the Name, Seek the Fame POJ 2752【KMP next数组的应用】
DescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the sa原创 2015-08-07 17:56:38 · 317 阅读 · 0 评论 -
poj1442 Black Box【优先队列,定义两个队列】
#include #include using namespace std;int main(){ int a[30005],i,j,n,m; while(scanf("%d%d",&n,&m)!=EOF) { priority_queue , less > p; //大的先 priority_queue , greater >q;//原创 2015-07-30 20:13:24 · 513 阅读 · 0 评论 -
poj 1064 Cable master【二分】
DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It wa原创 2015-07-30 20:04:05 · 458 阅读 · 0 评论 -
Truck History POJ 1789【Kruscal算法 || Prim】
DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing ea原创 2015-08-11 17:43:42 · 421 阅读 · 0 评论 -
Highways POJ 2485【Prim】
DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this probl原创 2015-08-12 15:35:00 · 528 阅读 · 0 评论 -
Cube Stacking POJ1988 【并查集的应用】
http://poj.org/problem?id=1988DescriptionFarmer John and Betsy are playing a game with N (1 moves and counts. * In a move operation, Farmer John asks Bessie to move the stack containing原创 2015-08-27 09:52:08 · 1197 阅读 · 0 评论 -
Highways POJ 1751 【Prim || Kruscal】
DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already con原创 2015-08-12 21:31:52 · 568 阅读 · 0 评论 -
POJ 2653 Pick-up sticks【计算几何入门】
http://poj.org/problem?id=2653Pick-up sticksTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 11638 Accepted: 4390DescriptionStan has n sticks o原创 2016-03-24 20:21:18 · 547 阅读 · 1 评论