随笔分类 -  POJ

http://poj.org/
摘要:Milking TimeTime Limit:1000MSMemory Limit:65536KTotal Submissions:3607Accepted:1533DescriptionBessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her nextN(1 ≤N≤ 1,000,000) hours (conveniently labeled 0..N-1) so that she produces 阅读全文
posted @ 2013-08-21 19:51 ~~Snail~~ 阅读(217) 评论(0) 推荐(0)
摘要:Apple CatchingTime Limit:1000MSMemory Limit:65536KTotal Submissions:6397Accepted:3102DescriptionIt is a little known fact that cows love apples. Farmer John has two apple trees (which are conveniently numbered 1 and 2) in his field, each full of apples. Bessie cannot reach the apples when they are o 阅读全文
posted @ 2013-08-21 19:35 ~~Snail~~ 阅读(194) 评论(0) 推荐(0)
摘要:SumsetsTime Limit:2000MSMemory Limit:200000KTotal Submissions:11009Accepted:4433DescriptionFarmer 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 power of 2. Here are the possible sets of numbers that sum to 7: 阅读全文
posted @ 2013-08-21 19:26 ~~Snail~~ 阅读(145) 评论(0) 推荐(0)
摘要:Cow BowlingTime Limit:1000MSMemory Limit:65536KTotal Submissions:12121Accepted:7985DescriptionThe cows don't use actual bowling balls when they go bowling. They each take a number (in the range 0..99), though, and line up in a standard bowling-pin-like triangle like this: 7 3 8 ... 阅读全文
posted @ 2013-08-19 14:28 ~~Snail~~ 阅读(188) 评论(0) 推荐(0)
摘要:Protecting the FlowersTime Limit:2000MSMemory Limit:65536KTotal Submissions:3290Accepted:1332DescriptionFarmer John went to cut some wood and leftN(2 ≤N≤ 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the cluster of cows was in his garden eating his beautiful 阅读全文
posted @ 2013-08-08 20:41 ~~Snail~~ 阅读(221) 评论(0) 推荐(0)
摘要:StripiesTime Limit:1000MSMemory Limit:30000KTotal Submissions:10373Accepted:5017DescriptionOur chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian - polosatiki, but the scientists had to invent an English name to apply for an i 阅读全文
posted @ 2013-08-08 20:30 ~~Snail~~ 阅读(216) 评论(0) 推荐(0)
摘要:PacketsTime Limit:1000MSMemory Limit:10000KTotal Submissions:39956Accepted:13361DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered to customers in the square parcels of the same heigh 阅读全文
posted @ 2013-08-08 20:18 ~~Snail~~ 阅读(227) 评论(0) 推荐(0)
摘要:Yogurt factoryTime Limit:1000MSMemory Limit:65536KTotal Submissions:5472Accepted:2811DescriptionThe cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 2 #include 3 4 using namespace std; 5 6 int n,s; 7 8 int main() 9 {10 int c,y,current;11 while... 阅读全文
posted @ 2013-08-08 20:06 ~~Snail~~ 阅读(316) 评论(0) 推荐(0)
摘要:Cleaning ShiftsTime Limit:1000MSMemory Limit:65536KTotal Submissions:8457Accepted:2263DescriptionFarmer John is assigning some of his N (1 2 #include 3 #include 4 5 using namespace std; 6 7 typedef struct 8 { 9 int Start;10 int End;11 } COW;12 13 int n,t;14 COW cow[25010];15 16 bool cmp(C... 阅读全文
posted @ 2013-08-08 19:55 ~~Snail~~ 阅读(226) 评论(0) 推荐(0)
摘要:Smallest DifferenceTime Limit:1000MSMemory Limit:65536KTotal Submissions:2669Accepted:763DescriptionGiven a number of distinct decimal digits, you can form one integer by choosing a non-empty subset of these digits and writing them in some order. The remaining digits can be written down in some orde 阅读全文
posted @ 2013-08-06 19:34 ~~Snail~~ 阅读(1009) 评论(1) 推荐(0)
摘要:Red and BlackTime Limit:1000MSMemory Limit:30000KTotal Submissions:19254Accepted:10252DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can' 阅读全文
posted @ 2013-08-06 19:15 ~~Snail~~ 阅读(220) 评论(0) 推荐(0)
摘要:ExpeditionTime Limit:1000MSMemory Limit:65536KTotal Submissions:4023Accepted:1309DescriptionA group of cows grabbed a truck and ventured on an expedition deep into the jungle. Being rather poor drivers, the cows unfortunately managed to run over a rock and puncture the truck's fuel tank. The tru 阅读全文
posted @ 2013-08-03 11:22 ~~Snail~~ 阅读(329) 评论(0) 推荐(0)
摘要:Inglish-Number TranslatorTime Limit:1000MSMemory Limit:65536KTotal Submissions:4183Accepted:1608DescriptionIn this problem, you will be given one or more integers in English. Your task is to translate these numbers into their integer representation. The numbers can range from negative 999,999,999 to 阅读全文
posted @ 2013-07-29 11:39 ~~Snail~~ 阅读(963) 评论(0) 推荐(0)
摘要:Gold CoinsTime Limit:1000MSMemory Limit:30000KTotal Submissions:19537Accepted:12169DescriptionThe king pays his loyal knight in gold coins. On the first day of his service, the knight receives one gold coin. On each of the next two days (the second and third days of service), the knight receives two 阅读全文
posted @ 2013-07-28 15:44 ~~Snail~~ 阅读(217) 评论(0) 推荐(0)
摘要:Saruman's ArmyTime Limit:1000MSMemory Limit:65536KTotal Submissions:2582Accepted:1284DescriptionSaruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track of his forces, Saruman distributes seeing stones, known as palantirs, among the troops. Each pala 阅读全文
posted @ 2013-07-28 15:20 ~~Snail~~ 阅读(328) 评论(0) 推荐(0)
摘要:Best Cow LineTime Limit:1000MSMemory Limit:65536KTotal Submissions:6252Accepted:2010DescriptionFJ is about to take hisN(1 ≤N≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges.The contest organ 阅读全文
posted @ 2013-07-28 13:47 ~~Snail~~ 阅读(267) 评论(0) 推荐(0)
摘要:Lake CountingTime Limit:1000MSMemory Limit:65536KTotal Submissions:16042Accepted:8118DescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 2 #include 3 4 using namespace std; 5 6 int n,m; 7 char garden[102][102] 阅读全文
posted @ 2013-07-28 12:28 ~~Snail~~ 阅读(193) 评论(0) 推荐(0)
摘要:AntsTime Limit:1000MSMemory Limit:30000KTotal Submissions:6418Accepted:3010DescriptionAn 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 ants meet they turn back and sta 阅读全文
posted @ 2013-07-27 19:06 ~~Snail~~ 阅读(205) 评论(0) 推荐(0)
摘要:Gold Balanced LineupTime Limit:2000MSMemory Limit:65536KTotal Submissions:10516Accepted:3145DescriptionFarmer John'sNcows (1 ≤N≤ 100,000) share many similarities. In fact, FJ has been able to narrow down the list of features shared by his cows to a list of onlyKdifferent features (1 ≤K≤ 30). For 阅读全文
posted @ 2013-07-12 20:40 ~~Snail~~ 阅读(198) 评论(0) 推荐(0)
摘要:To the MaxTime Limit:1000MSMemory Limit:10000KTotal Submissions:36422Accepted:19130DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is the sum of all t 阅读全文
posted @ 2013-07-12 11:05 ~~Snail~~ 阅读(163) 评论(0) 推荐(0)