随笔分类 -  CF

1 2 下一页

B. Making Sequences is Fun 暴力比较水
摘要:B. Making Sequences is Funtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe'll defineS(n)for positive integernas follows: the number of then's digits in the decimal base. For example,S(893) = 3,S(114514) = 6.You want to make a consecutiv 阅读全文

posted @ 2013-12-15 16:41 keep trying 阅读(497) 评论(0) 推荐(0)

C. Counting Kangaroos is Fun 贪心
摘要:C. Counting Kangaroos is Funtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere arenkangaroos with pockets. Each kangaroo has a size (integer number). A kangaroo can go into another kangaroo's pocket if and only if the size of kangaroo who h 阅读全文

posted @ 2013-12-15 16:40 keep trying 阅读(439) 评论(0) 推荐(0)

E - Levko and Array DP + e二分
摘要:E -Levko and ArrayTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionLevko has an array that consists of integers:a1, a2, ... , an. But he doesn’t like this array at all.Levko thinks that the beauty of the arrayadirectly depends on value 阅读全文

posted @ 2013-12-03 14:13 keep trying 阅读(249) 评论(0) 推荐(0)

B - Free Market 涉及背包问题 + DP
摘要:B -Free MarketTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionJohn Doe has recently found a "Free Market" in his city — that is the place where you can exchange some of your possessions for other things for free.John knows t 阅读全文

posted @ 2013-12-01 21:22 keep trying 阅读(319) 评论(0) 推荐(0)

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 阅读(165) 评论(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 阅读(272) 评论(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 阅读(459) 评论(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 阅读(221) 评论(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 阅读(369) 评论(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 阅读(258) 评论(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 阅读(306) 评论(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 阅读(316) 评论(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 阅读(247) 评论(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 阅读(308) 评论(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 阅读(301) 评论(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 阅读(280) 评论(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 阅读(229) 评论(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 阅读(252) 评论(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)

1 2 下一页

导航