随笔分类 -  POJ

http://poj.org/
摘要:StarsTime Limit:1000MSMemory Limit:65536KTotal Submissions:29602Accepted:12924DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to the 阅读全文
posted @ 2014-03-07 16:46 ~~Snail~~ 阅读(149) 评论(0) 推荐(0)
摘要:Popular CowsTime Limit:2000MSMemory Limit:65536KTotal Submissions:21685Accepted:8852DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 2 #include 3 #include 4 #include 5 #define MAX_V 10050 6 7 using namespace std; 8 9 int V,E; 10 vector G[MAX_V]... 阅读全文
posted @ 2014-03-07 11:52 ~~Snail~~ 阅读(284) 评论(0) 推荐(0)
摘要:Count ColorTime Limit:1000MSMemory Limit:65536KTotal Submissions:33098Accepted:9995DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.There is a very long board with length L centimeter, L is a posit 阅读全文
posted @ 2014-03-06 20:10 ~~Snail~~ 阅读(162) 评论(0) 推荐(0)
摘要:A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:53810Accepted:16150Case Time Limit:2000MSDescriptionYou haveNintegers,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 given interv 阅读全文
posted @ 2014-03-06 10:30 ~~Snail~~ 阅读(134) 评论(0) 推荐(0)
摘要:Jack StrawsTime Limit:1000MSMemory Limit:10000KTotal Submissions:2942Accepted:1331DescriptionIn the game of Jack Straws, a number of plastic or wooden "straws" are dumped on the table and players try to remove them one-by-one without disturbing the other straws. Here, we are only concerned 阅读全文
posted @ 2014-02-28 21:39 ~~Snail~~ 阅读(291) 评论(0) 推荐(0)
摘要:CompromiseIn a few months the European Currency Union will become a reality. However, to join the club, the Maastricht criteria must be fulfilled, and this is not a trivial task for the countries (maybe except for Luxembourg). To enforce that Germany will fulfill the criteria, our government has so 阅读全文
posted @ 2014-02-25 21:18 ~~Snail~~ 阅读(188) 评论(0) 推荐(0)
摘要:Air RaidTime Limit:1000MSMemory Limit:10000KTotal Submissions:6275Accepted:3756DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town's streets you can never 阅读全文
posted @ 2014-02-25 20:57 ~~Snail~~ 阅读(165) 评论(0) 推荐(0)
摘要:Drainage DitchesTime Limit:1000MSMemory Limit:10000KTotal Submissions:52160Accepted:19830DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. 阅读全文
posted @ 2014-02-21 20:59 ~~Snail~~ 阅读(206) 评论(0) 推荐(0)
摘要:BookshelfTime Limit:1000MSMemory Limit:65536KTotal Submissions:6990Accepted:3506DescriptionFarmer John recently bought a bookshelf for cow library, but the shelf is getting filled up quite quickly, and now the only available space is at the top.Each of theNcows (1 ≤N≤ 20,000) has some height ofHi(1 阅读全文
posted @ 2014-02-01 22:08 ~~Snail~~ 阅读(517) 评论(0) 推荐(0)
摘要:IMMEDIATE DECODABILITYTime Limit:1000MSMemory Limit:10000KTotal Submissions:10504Accepted:4971DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all codes are in bin 阅读全文
posted @ 2014-02-01 22:03 ~~Snail~~ 阅读(143) 评论(0) 推荐(0)
摘要:THE DRUNK JAILERTime Limit:1000MSMemory Limit:10000KTotal Submissions:21957Accepted:13879DescriptionA certain prison contains a long hall of n cells, each right next to each other. Each cell has a prisoner in it, and each cell is locked.One night, the jailer gets bored and decides to play a game. Fo 阅读全文
posted @ 2014-02-01 21:58 ~~Snail~~ 阅读(151) 评论(0) 推荐(0)
摘要:ExponentiationTime Limit:500MSMemory Limit:10000KTotal Submissions:127046Accepted:31014DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.Th 阅读全文
posted @ 2014-01-21 12:28 ~~Snail~~ 阅读(296) 评论(0) 推荐(0)
摘要:SubsequenceTime Limit:1000MSMemory Limit:65536KTotal Submissions:7307Accepted:2710DescriptionA sequence of N positive integers (10 s的t,对每个t用二分查找的方法在前面找到满足条件且与它距离最近的s,求出最小值即可 1 #include 2 #include 3 4 using namespace std; 5 6 int n,s; 7 int sum[100010]; 8 9 int main()10 {11 int kase;12 13 ... 阅读全文
posted @ 2013-09-04 10:55 ~~Snail~~ 阅读(283) 评论(0) 推荐(0)
摘要:Aggressive cowsTime Limit:1000MSMemory Limit:65536KTotal Submissions:4808Accepted:2356DescriptionFarmer John has built a new long barn, with N (2 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 int n,c; 9 int x[100010];10 11 int main()12 {13 scanf("%d %d",&n,&c);14 fo 阅读全文
posted @ 2013-09-04 10:02 ~~Snail~~ 阅读(590) 评论(0) 推荐(0)
摘要:Cable masterTime Limit:1000MSMemory Limit:10000KTotal Submissions:18552Accepted:3975DescriptionInhabitants 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 was decided to connect 阅读全文
posted @ 2013-09-03 16:55 ~~Snail~~ 阅读(304) 评论(0) 推荐(0)
摘要:Invitation CardsTime Limit:8000MSMemory Limit:262144KTotal Submissions:17127Accepted:5570DescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. They 阅读全文
posted @ 2013-09-02 16:40 ~~Snail~~ 阅读(193) 评论(0) 推荐(0)
摘要:MPI MaelstromTime Limit:1000MSMemory Limit:10000KTotal Submissions:4323Accepted:2624DescriptionBIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee's research advis 阅读全文
posted @ 2013-08-29 21:30 ~~Snail~~ 阅读(153) 评论(0) 推荐(0)
摘要:Stockbroker GrapevineTime Limit:1000MSMemory Limit:10000KTotal Submissions:23849Accepted:13104DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the st 阅读全文
posted @ 2013-08-29 21:26 ~~Snail~~ 阅读(149) 评论(0) 推荐(0)
摘要:Curling 2.0Time Limit:1000MSMemory Limit:65536KTotal Submissions:8810Accepted:3703DescriptionOn Planet MM-21, after their Olympic games this year, cur... 阅读全文
posted @ 2013-08-24 20:20 ~~Snail~~ 阅读(197) 评论(0) 推荐(0)
摘要:SunscreenTime Limit:1000MSMemory Limit:65536KTotal Submissions:2616Accepted:925DescriptionTo avoid unsightly burns while tanning, each of theC(1 ≤C≤ 2500) cows must cover her hide with sunscreen when they're at the beach. Cowihas a minimum and maximumSPFrating (1 ≤minSPFi≤ 1,000;minSPFi≤maxSPFi≤ 阅读全文
posted @ 2013-08-21 20:23 ~~Snail~~ 阅读(349) 评论(0) 推荐(0)