11 2013 档案

B. Valera and Contest 构造水题
摘要:B. Valera and Contesttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera loves to participate in competitions. Especially in programming contests. Today he has participated in the contest with his team, consisting ofnstudents (including Valera) 阅读全文

posted @ 2013-11-30 21:09 keep trying 阅读(167) 评论(0) 推荐(0)

C. Valera and Elections DFS
摘要:C. Valera and Electionstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe city Valera lives in is going to hold elections to the city Parliament.The city hasndistricts andn - 1bidirectional roads. We know that from any district there is a path al 阅读全文

posted @ 2013-11-30 21:06 keep trying 阅读(274) 评论(0) 推荐(0)

G - Jeff and Furik 逆序对 + 贪心
摘要:G -Jeff and FurikTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionJeff has become friends with Furik. Now these two are going to play one quite amusing game.At the beginning of the game Jeff takes a piece of paper and writes down a per 阅读全文

posted @ 2013-11-30 19:28 keep trying 阅读(461) 评论(0) 推荐(0)

I - Apple Tree 树形dp
摘要:I -Apple TreeTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou are given a rooted tree withnvertices. In each leaf vertex there's a single integer — the number of apples in this vertex.Theweightof a subtree is the sum of all num 阅读全文

posted @ 2013-11-29 20:44 keep trying 阅读(222) 评论(0) 推荐(0)

D - Levko and Array Recovery 构造
摘要:D -Levko and Array RecoveryTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionLevko loves arraya1, a2, ... , an, consisting of integers, very much. That is why Levko is playing with arraya, performing all sorts of operations with it. Eac 阅读全文

posted @ 2013-11-29 15:02 keep trying 阅读(372) 评论(0) 推荐(0)

H - New Year Cruise 略水
摘要:H -New Year CruiseTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 1869DescriptionAnd I drank it straight down.In the life of Russian people there is always a place for a holiday! Even more so when several causes for celebration follow each other— New Ye 阅读全文

posted @ 2013-11-28 20:02 keep trying 阅读(188) 评论(0) 推荐(0)

Fibonacci Tree 最小生成树
摘要:Fibonacci TreeTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 434Accepted Submission(s): 146Problem Description Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pang decides to. 阅读全文

posted @ 2013-11-27 16:27 keep trying 阅读(260) 评论(0) 推荐(0)

B. Sereja and Suffixes 水题
摘要:B. Sereja and Suffixestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSereja has an arraya, consisting ofnintegersa1,a2,...,an. The boy cannot sit and do nothing, he decided to study an array. Sereja took a piece of paper and wrote outmintegersl1, 阅读全文

posted @ 2013-11-27 12:31 keep trying 阅读(259) 评论(0) 推荐(0)

C. Sereja and Algorithm 贪心
摘要:C. Sereja and Algorithmtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSereja loves all sorts of algorithms. He has recently come up with a new algorithm, which receives a string as an input. Let's represent the input string of the algorithm a 阅读全文

posted @ 2013-11-27 12:30 keep trying 阅读(310) 评论(0) 推荐(0)

A - Matrix 字符串 + 数学
摘要:A -MatrixTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou have a string of decimal digitss. Let's definebij = si·sj. Find in matrixbthe number of such rectangles that the sumbijfor all cells(i, j)that are the elements of t 阅读全文

posted @ 2013-11-26 23:04 keep trying 阅读(317) 评论(0) 推荐(0)

P - Sereja and Contest 数学
摘要:P -Sereja and ContestTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionDuring the last Sereja's Codesecrof round the server crashed many times, so the round was decided to be made unrated for some participants.Let's assume thatn 阅读全文

posted @ 2013-11-26 18:59 keep trying 阅读(249) 评论(0) 推荐(0)

Web Navigation 模拟
摘要:Web NavigationTime Limit:1000MSMemory Limit:10000KTotal Submissions:27179Accepted:12164DescriptionStandard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be reac 阅读全文

posted @ 2013-11-25 19:04 keep trying 阅读(366) 评论(0) 推荐(0)

A. Strange Addition 暴力
摘要:A. Strange Additiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputUnfortunately, Vasya can only sum pairs of integers (a,b), such that for any decimal place at least one number has digit0in this place. For example, Vasya can sum numbers505and50, 阅读全文

posted @ 2013-11-25 17:08 keep trying 阅读(309) 评论(0) 推荐(0)

A - Pair of Numbers 数论
摘要:A -Pair of NumbersTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionSimon has an arraya1, a2, ..., an, consisting ofnpositive integers. Today Simon asked you to find a pair of integersl, r(1 ≤ l ≤ r ≤ n), such that the following conditi 阅读全文

posted @ 2013-11-25 15:08 keep trying 阅读(302) 评论(0) 推荐(0)

I - Biridian Forest BFS+最短路
摘要:I -Biridian ForestTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou're a mikemon breeder currently in the middle of your journey to become a mikemon master. Your current obstacle is go through the infamous Biridian Forest.The fo 阅读全文

posted @ 2013-11-22 20:45 keep trying 阅读(281) 评论(0) 推荐(0)

D. Block Tower + DFS
摘要:D. Block Towertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter too much playing on paper, Iahub has switched to computer games. The game he plays is called "Block Towers". It is played in a rectangular grid withnrows andmcolumns (i 阅读全文

posted @ 2013-11-22 19:46 keep trying 阅读(232) 评论(0) 推荐(0)

K - Magic Five 逆元
摘要:K -Magic FiveTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionThere is a long platescontainingndigits. Iahub wants to delete some digits (possibly none, but he is not allowed to delete all the digits) to form his "magic number&quo 阅读全文

posted @ 2013-11-22 15:56 keep trying 阅读(255) 评论(0) 推荐(0)

K - Building designing 其实是贪心
摘要:K -Building designingTime Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusDescriptionBuilding designingAn architect wants to design a very high building. The building will consist of some floors, and each floor has a certain size. The size of a floor must be greater than the s 阅读全文

posted @ 2013-11-21 21:06 keep trying 阅读(291) 评论(0) 推荐(0)

M - Ciel and Duel 贪心
摘要:M -Ciel and DuelTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionFox Ciel is playing a card game with her friend Jiro.Jiro hasncards, each one has two attributes:position(Attack or Defense) andstrength. Fox Ciel hasmcards, each one has 阅读全文

posted @ 2013-11-20 15:13 keep trying 阅读(192) 评论(0) 推荐(0)

L - Black-and-White Cube 简单构造
摘要:L -Black-and-White CubeTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou are given a cube of sizek × k × k, which consists of unit cubes. Two unit cubes are considered neighbouring, if they have common face.Your task is to 阅读全文

posted @ 2013-11-19 13:13 keep trying 阅读(274) 评论(0) 推荐(0)

O - Ciel and Robot 模拟
摘要:O -Ciel and RobotTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionFox Ciel has a robot on a 2D plane. Initially it is located in (0, 0). Fox Ciel code a command to it. The command was represented by strings. Each character ofsis one mo 阅读全文

posted @ 2013-11-18 19:04 keep trying 阅读(268) 评论(0) 推荐(0)

B. Levko and Permutation 简单构造
摘要:B. Levko and Permutationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLevko loves permutations very much. A permutation of lengthnis a sequence of distinct positive integers, each is at mostn.Let’s assume that valuegcd(a, b)shows the greatest co 阅读全文

posted @ 2013-11-17 16:47 keep trying 阅读(349) 评论(0) 推荐(0)

P - Psychos in a Line 单调队列
摘要:P -Psychos in a LineTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionThere arenpsychos standing in a line. Each psycho is assigned a unique integer from1ton. At each step every psycho who has an id greater than the psycho to his right 阅读全文

posted @ 2013-11-17 15:53 keep trying 阅读(260) 评论(0) 推荐(0)

H - Purification 模拟构造
摘要:H -PurificationTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming ann &# 阅读全文

posted @ 2013-11-16 21:02 keep trying 阅读(202) 评论(0) 推荐(0)

C. Insertion Sort DP
摘要:C. Insertion Sorttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya is a beginner programmer. He has already mastered the basics of the C++ language and moved on to learning algorithms. The first algorithm he encountered was insertion sort. Pe 阅读全文

posted @ 2013-11-16 09:23 keep trying 阅读(269) 评论(0) 推荐(0)

A. Two Semiknights Meet DFS
摘要:A. Two Semiknights Meettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA boy Petya loves chess very much. He even came up with a chess piece of his own, a semiknight. The semiknight can move in any of these four directions:2squares forward and2squ 阅读全文

posted @ 2013-11-15 20:39 keep trying 阅读(325) 评论(0) 推荐(0)

Dummy Guy 几何
摘要:Dummy GuyTime Limit:500MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 1984DescriptionEvery year students of our university participate in Regional Contest in Saint Petersburg. Train journeys from Yekaterinburg to Saint Petersburg make students very thirsty, so they u 阅读全文

posted @ 2013-11-15 14:49 keep trying 阅读(341) 评论(0) 推荐(0)

Electrification Plan MST
摘要:Electrification PlanTime Limit:500MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 1982DescriptionSome country hasncities. The government has decided to electrify all these cities. At first, power stations inkdifferent cities were built. The other cities should be conn 阅读全文

posted @ 2013-11-15 14:48 keep trying 阅读(219) 评论(0) 推荐(0)

Parallel and Perpendicular 几何,数学
摘要:Parallel and PerpendicularTime Limit:500MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 1981DescriptionYou are given a regularn-gon. Your task is to calculate two values: the number of its diagonals that are parallel to at least one of its other diagonals, and the num 阅读全文

posted @ 2013-11-15 14:47 keep trying 阅读(248) 评论(0) 推荐(0)

A. Soroban 暴力+水题
摘要:A. Sorobantime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou know that Japan is the country with almost the largest 'electronic devices per person' ratio. So you might be quite surprised to find out that the primary school in Japan teache 阅读全文

posted @ 2013-11-11 21:23 keep trying 阅读(278) 评论(0) 推荐(0)

B. Fence 前缀和 水题
摘要:B. Fencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a fence in front of Polycarpus's home. The fence consists ofnplanks of the same width which go one after another from left to right. The height of thei-th plank ishimeters, disti 阅读全文

posted @ 2013-11-11 21:22 keep trying 阅读(368) 评论(0) 推荐(0)

C. Fixing Typos 贪心
摘要:C. Fixing Typostime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMany modern text editors automatically check the spelling of the user's text. Some editors even suggest how to correct typos.In this problem your task to implement a small function 阅读全文

posted @ 2013-11-11 21:21 keep trying 阅读(304) 评论(0) 推荐(0)

D. Renting Bikes 二分
摘要:D. Renting Bikestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA group ofnschoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.The renting site offered themmbikes. The renting price is different for different 阅读全文

posted @ 2013-11-11 21:20 keep trying 阅读(399) 评论(0) 推荐(0)

Maximum Absurdity DP + 数学
摘要:Maximum AbsurdityTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionReforms continue entering Berland. For example, during yesterday sitting the Berland Parliament approved as much asnlaws (each law has been assigned a unique number from 阅读全文

posted @ 2013-11-09 18:38 keep trying 阅读(215) 评论(0) 推荐(0)

模拟 H - Penalties Kick
摘要:H -Penalties KickTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%lld & %lluSubmitStatusDescriptionFootball is an excellent game, but sometimes it is cruel. As you know, two football teams may have a tie after regular time and even addition time, but we have to judge who is the winner, so p 阅读全文

posted @ 2013-11-09 15:50 keep trying 阅读(228) 评论(0) 推荐(0)

Secrets 数论
摘要:SecretsDescriptionGerald has been selling state secrets at leisure. All the secrets cost the same:nmarks. The state which secrets Gerald is selling, has no paper money, only coins. But there are coins of all positive integer denominations that are powers of three: 1 mark, 3 marks, 9 marks, 27 marks 阅读全文

posted @ 2013-11-07 22:57 keep trying 阅读(230) 评论(0) 推荐(0)

A. Knight Tournament SET的应用
摘要:A. Knight Tournamenttime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHooray! Berl II, the king of Berland is making a knight tournament. The king has already sent the message to all knights in the kingdom and they in turn agreed to participate in 阅读全文

posted @ 2013-11-07 20:26 keep trying 阅读(239) 评论(0) 推荐(0)

B. Xenia and Hamming Codeforces 256B GCD,LCM处理字符串
摘要:B. Xenia and Hammingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputXenia is an amateur programmer. Today on the IT lesson she learned about the Hamming distance.The Hamming distance between two stringss = s1s2...snandt = t1t2...tnof equal lengthn 阅读全文

posted @ 2013-11-07 13:26 keep trying 阅读(343) 评论(0) 推荐(0)

导航