摘要: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 <
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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-
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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 -
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文