随笔分类 -  ACM题解

上一页 1 2 3 4 5 6 7 8 下一页

Codeforces Round #179 (Div. 2) B. Yaroslav and Two Strings(组合数学)
摘要:B. Yaroslav and Two Stringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYaroslav thinks that two stringssandw, consisting of digits and having lengthnare non-comparable if there are two numbers,iandj(1 ≤ i, j ≤ n), such thatsi > wiandsj < 阅读全文

posted @ 2013-04-29 17:55 铁树银花 阅读(394) 评论(0) 推荐(0) 编辑

The Perfect Stall(二分图匹配,最大流EK算法)
摘要:The Perfect StallTime Limit:1000MSMemory Limit:10000KTotal Submissions:15553Accepted:7118DescriptionFarmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering problems, all the stalls in the new barn are different. For the fi 阅读全文

posted @ 2013-04-27 23:48 铁树银花 阅读(213) 评论(0) 推荐(0) 编辑

Drainage Ditches(最大流入门)
摘要:Drainage DitchesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5649Accepted Submission(s): 2666Problem DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is 阅读全文

posted @ 2013-04-20 23:04 铁树银花 阅读(316) 评论(0) 推荐(0) 编辑

Look Up
摘要:Problem 1845 Look UpAccept: 173Submit: 543Time Limit: 1000 mSecMemory Limit : 32768 KBProblem DescriptionN (1 <= N <= 100,000) monkeys in the mountains, conveniently numbered 1..N, are once again standing in a row. Monkey i has height Hi(1 <= Hi<= 1,000,000).Each monkey is looking to his 阅读全文

posted @ 2013-04-16 17:58 铁树银花 阅读(455) 评论(0) 推荐(0) 编辑

Codeforces Round #179 (Div. 2) A. Yaroslav and Permutations(简单)
摘要:A. Yaroslav and Permutationstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYaroslav has an array that consists of n integers. In one second Yaroslav can swap two neighboring array elements. Now Yaroslav is wondering if he can obtain an array whe 阅读全文

posted @ 2013-04-16 09:46 铁树银花 阅读(679) 评论(0) 推荐(0) 编辑

Substring Frequency (KMP)
摘要:Substring FrequencyTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status Practice LightOJ 1255DescriptionA string is a finite sequence of symbols that are chosen from an alphabet. In this problem you are given two non-empty strings A and B, both contain lower case Engli 阅读全文

posted @ 2013-04-08 13:17 铁树银花 阅读(377) 评论(0) 推荐(0) 编辑

Harmonic Number(打表法)
摘要:Harmonic Number Time Limit:3000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit Status Practice LightOJ 1234DescriptionIn mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers:In this problem, you are given n, you have to find Hn.InputInput st 阅读全文

posted @ 2013-04-03 20:08 铁树银花 阅读(588) 评论(0) 推荐(0) 编辑

False Ordering(统计因子个数、素因子分解)
摘要:False OrderingTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ 1109DescriptionWe definebis a Divisor of a numberaifais divisible byb. So, the divisors of 12 are 1, 2, 3, 4, 6, 12. So, 12 has 6 divisors.Now you have to order all the integers from 1 to 10 阅读全文

posted @ 2013-04-02 21:46 铁树银花 阅读(353) 评论(0) 推荐(0) 编辑

Codeforces Round #176 (Div. 2) A. IQ Test(简单搜索)
摘要:A. IQ Testtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the city of Ultima Thule job applicants are often offered an IQ test.The test is as follows: the person gets a piece of squared paper with a4 × 4square painted on it. Some of the s 阅读全文

posted @ 2013-03-30 16:39 铁树银花 阅读(451) 评论(0) 推荐(0) 编辑

Codeforces Round #175 (Div. 2) C. Building Permutation(贪心)
摘要:C. Building Permutationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPermutation p is an ordered set of integers p1, p2, ..., pn, consisting of n distinct positive integers, each of them doesn't exceed n. We'll denote the i-th element o 阅读全文

posted @ 2013-03-30 13:36 铁树银花 阅读(244) 评论(0) 推荐(0) 编辑

Codeforces Round #175 (Div. 2) B. Find Marble(简单模拟)
摘要:B. Find Marbletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya and Vasya are playing a game. Petya's gotnnon-transparent glasses, standing in a row. The glasses' positions are indexed with integers from1tonfrom left to right. Note th 阅读全文

posted @ 2013-03-29 21:37 铁树银花 阅读(369) 评论(0) 推荐(0) 编辑

Codeforces Round #175 (Div. 2) A. Slightly Decreasing Permutations(构造,简单)
摘要:A. Slightly Decreasing Permutationstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPermutation p is an ordered set of integers p1, p2, ..., pn, consisting of n distinct positive integers, each of them doesn't exceed n. We'll denote the i- 阅读全文

posted @ 2013-03-28 23:45 铁树银花 阅读(352) 评论(0) 推荐(0) 编辑

Codeforces Round #174 (Div. 2) Cows and Sequence(线段树)
摘要:C. Cows and Sequencetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBessie and the cows are playing with sequences and need your help. They start with a sequence, initially containing just the number 0, and perform n operations. Each operation is 阅读全文

posted @ 2013-03-26 19:35 铁树银花 阅读(319) 评论(0) 推荐(1) 编辑

Codeforces Round #174 (Div. 2) B. Cows and Poker Game(简单)
摘要:B. Cows and Poker Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n cows playing poker at a table. For the current betting phase, each player's status is either "ALLIN", "IN", or "FOLDED", and does 阅读全文

posted @ 2013-03-25 17:49 铁树银花 阅读(281) 评论(0) 推荐(0) 编辑

Ignatius's puzzle(数学)
摘要:Ignatius's puzzleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4513Accepted Submission(s): 3068Problem DescriptionIgnatius is poor at math,he falls across a puzzle problem,so he has no choice but to appeal to Eddy. this problem describes that 阅读全文

posted @ 2013-03-23 16:18 铁树银花 阅读(444) 评论(0) 推荐(0) 编辑

Ignatius and the Princess II(STL)
摘要:Ignatius and the Princess IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3163Accepted Submission(s): 1883Problem DescriptionNow our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty P 阅读全文

posted @ 2013-03-22 16:54 铁树银花 阅读(276) 评论(0) 推荐(0) 编辑

Codeforces Round #174 (Div. 2) Cows and Primitive Roots(数论)
摘要:Cows and Primitive Rootstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe cows have just learned what a primitive root is! Given a prime p, a primitive root is an integer x (1 ≤ x < p) such that none of integers x - 1, x2 - 1, ..., xp - 2 -  阅读全文

posted @ 2013-03-22 13:46 铁树银花 阅读(322) 评论(0) 推荐(0) 编辑

I Think I Need a Houseboat(计算几何,水题)
摘要:I Think I Need a HouseboatTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 75574Accepted: 32356DescriptionFred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking 阅读全文

posted @ 2013-03-20 17:56 铁树银花 阅读(245) 评论(0) 推荐(0) 编辑

Hangover(水题)
摘要:HangoverTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 86843Accepted: 41852DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the table 阅读全文

posted @ 2013-03-20 17:44 铁树银花 阅读(236) 评论(0) 推荐(0) 编辑

Balanced Lineup(简单的线段树)
摘要:Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 26339Accepted: 12351Case 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-03-18 20:42 铁树银花 阅读(256) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 下一页

导航