摘要: 转再出处 http://www.cnblogs.com/Booble/转载请注明出处 http://www.cnblogs.com/Booble/[Poj 1113] 计算几何之凸包(一) {卷包裹算法}{半个寒假都在写凸包这几篇文章整理一下主要介绍 二维凸包的求解算法以及一个简单的应用}====================================================================一.凸集&凸包(下文中所有的集合 若不作特殊说明 都是指欧氏空间上的集合)凸集(Convex Set):任意两点的连线都在这个集合内的集合就是一个凸集.A set i 阅读全文
posted @ 2013-08-14 19:51 ERKE 阅读(335) 评论(0) 推荐(0) 编辑
摘要: Play on WordsTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4263Accepted Submission(s): 1384 Problem DescriptionSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Becau 阅读全文
posted @ 2013-08-14 17:20 ERKE 阅读(719) 评论(0) 推荐(0) 编辑
摘要: Ant TripTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1107Accepted Submission(s): 404 Problem DescriptionAnt Country consist of N towns.There are M roads connecting the towns.Ant Tony,together with his friends,wants to go through every part of t 阅读全文
posted @ 2013-08-14 15:58 ERKE 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 欧拉回路Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8186Accepted Submission(s): 2926 Problem Description欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个图,问是否存在欧拉回路?Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是节点数N ( 1 2 #include 3 #include 4 #include 5 ... 阅读全文
posted @ 2013-08-14 15:14 ERKE 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Sliding WindowTime Limit: 12000MSMemory Limit: 65536KTotal Submissions: 32099Accepted: 9526Case Time Limit: 5000MSDescriptionAn array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers 阅读全文
posted @ 2013-08-14 14:03 ERKE 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Strange Way to Express IntegersTime Limit: 1000MSMemory Limit: 131072KTotal Submissions: 8176Accepted: 2439DescriptionElina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following:Choose k different positive integers 阅读全文
posted @ 2013-08-14 13:59 ERKE 阅读(248) 评论(0) 推荐(0) 编辑
摘要: BiorhythmsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 103506Accepted: 31995DescriptionSome 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 have perio 阅读全文
posted @ 2013-08-14 13:55 ERKE 阅读(165) 评论(0) 推荐(0) 编辑
摘要: DividingTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 53029Accepted: 13506DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the marbles had the same value 阅读全文
posted @ 2013-08-14 13:52 ERKE 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 28835Accepted: 13579Case Time Limit: 2000MSDescriptionFor 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 som 阅读全文
posted @ 2013-08-14 13:07 ERKE 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Color the ballTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6084Accepted Submission(s): 3227 Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int a[1000000]; ... 阅读全文
posted @ 2013-08-14 13:04 ERKE 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13001Accepted Submission(s): 6476 Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several conse 阅读全文
posted @ 2013-08-14 13:02 ERKE 阅读(229) 评论(0) 推荐(0) 编辑
摘要: I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 27606Accepted Submission(s): 10956 Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束 阅读全文
posted @ 2013-08-14 12:56 ERKE 阅读(236) 评论(0) 推荐(0) 编辑
摘要: I'm Telling the TruthTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1033Accepted Submission(s): 510 Problem DescriptionAfter this year’s college-entrance exam, the teacher did a survey in his class on students’ score. There are n students in 阅读全文
posted @ 2013-08-14 12:52 ERKE 阅读(293) 评论(0) 推荐(0) 编辑
摘要: Palindrome subsequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65535 K (Java/Others) Total Submission(s): 1538Accepted Submission(s): 635 Problem DescriptionIn mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without chang 阅读全文
posted @ 2013-08-14 12:49 ERKE 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 取石子游戏Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 31490Accepted: 10374Description有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采取最好的策略,问最后你是胜者还是败者。Input输入包含若干行,表示若干种石子的初始情况,其中每一行包含两个非负整数a和b,表示两堆石子的数目,a和b都不大 阅读全文
posted @ 2013-08-14 12:37 ERKE 阅读(137) 评论(0) 推荐(0) 编辑
摘要: A Simple Problem with IntegersTime Limit: 5000MSMemory Limit: 131072KTotal Submissions: 47174Accepted: 13844Case Time Limit: 2000MSDescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a g. 阅读全文
posted @ 2013-08-14 09:02 ERKE 阅读(548) 评论(0) 推荐(0) 编辑
摘要: MatrixTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 15125Accepted: 5683DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 2 #include 3 #include 4 #include 5 #include 6 using n... 阅读全文
posted @ 2013-08-14 08:53 ERKE 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Dome of CircusTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 937 Accepted Submission(s): 420 Special JudgeProblem DescriptionA travelling circus faces a tough challenge in designing the dome for its performances. The circus has a number of show 阅读全文
posted @ 2013-08-14 08:49 ERKE 阅读(216) 评论(0) 推荐(0) 编辑
摘要: E. XOR on SegmentYou've got an array a, consisting of n integers a1, a2, ..., an. You are allowed to perform two operations on this array:Calculate the sum of current array elements on the segment [l, r], that is, count value al + al + 1 + ... + ar.Apply the xor operation with a given number x t 阅读全文
posted @ 2013-08-14 08:38 ERKE 阅读(310) 评论(0) 推荐(0) 编辑