01 2014 档案
Sgu 114
摘要:114. Telecasting stationtime limit per test: 0.25 sec. memory limit per test: 4096 KB开始还自己一个一个的枚举想3分每个区间段,找最优,后来发现是线性的,看是大于还是小于0去两边,结果发现没加上取左边的,每次都是按取右边的在算,所以还是有问题,不过记得之前看过白书说中位点最优!- -Every city in Berland is situated on Ox axis. The government of the country decided to build new telecasting station
阅读全文
Sgu 113
摘要:113. Nearly prime numberstime limit per test: 0.25 sec. memory limit per test: 4096 KBNearly prime number is an integer positive number for which it is possible to find such primes P1 and P2 that given number is equal to P1*P2. There is given a sequence on N integer positive numbers, you are to writ
阅读全文
Sgu 112
摘要:112. ab-batime limit per test: 0.25 sec. memory limit per test: 4096 KBYou are given natural numbers a and b. Find ab-ba.InputInput contains numbers a and b (1≤a,b≤100).OutputWrite answer to output.Sample Input2 3Sample Output-1 1 #include 2 #include 3 #include 4 #include 5 #include 6 #in...
阅读全文
Sgu 111
摘要:111. Very simple problemtime limit per test: 0.25 sec. memory limit per test: 4096 KBYou are given natural number X. Find such maximum integer number that it square is not greater than X.InputInput file contains number X (1≤X≤101000).OutputWrite answer in output file.Sample Input16Sample Output4 1 .
阅读全文
Codeforce Round #226 Div2 B
摘要:Sponsored by HaibaraAi | Logout HomeContestsGymProblemsetGroupsRatingHelp Codeforces Round #226 (Div. 2)FinishedPractice → Practice You are registered for practice. You can solve problems unofficially. Results can be found in the contest status and in the bottom of standings. → Submit? La...
阅读全文
Codeforce Round #226 Div2 A
摘要:Sponsored by HaibaraAi | Logout HomeContestsGymProblemsetGroupsRatingHelp Codeforces Round #226 (Div. 2)FinishedPractice → Practice You are registered for practice. You can solve problems unofficially. Results can be found in the contest status and in the bottom of standings. → Submit? La...
阅读全文
Codeforce Round #226 Div2 C
摘要:Sponsored by HaibaraAi | Logout HomeContestsGymProblemsetGroupsRatingHelp Codeforces Round #226 (Div. 2)FinishedPractice → Practice You are registered for practice. You can solve problems unofficially. Results can be found in the contest status and in the bottom of standings. → Submit? La...
阅读全文
Codeforce Round #225 Div2 C
摘要:Sponsored by HaibaraAi | Logout You have Wow! You have +182! HomeContestsGymProblemsetGroupsRatingHelp Codeforces Round #225 (Div. 2)FinishedContestant → Practice? Want to solve the contest problems after the official contest ends? Just register for practice and you will be able to submit ...
阅读全文
Codeforce Round #223 Div2 B
摘要:B. Sereja and Stairstime limit per test 1 secondSereja loves integer sequences very much. He especially likes stairs.Sequence a1, a2, ..., a|a| (|a| is the length of the sequence) is stairs if there is such index i (1 ≤ i ≤ |a|), that the following condition is met:a1 ai + 1 > ... > a|a| - 1 &
阅读全文
Codeforce Round #223 Div2 A
摘要:A. Sereja and Dimatime limit per test 1 secondmemory limit per test 256 megabytesSereja and Dima play a game. The rules of the game are very simple. The players have n cards in a row. Each card contains a number, all numbers on the cards are distinct. The players take turns, Sereja moves first. Duri
阅读全文
Codeforce Round #224 Div2 A
摘要:A. Ksenia and Pan Scalestime limit per test 1 secondmemory limit per test 256 megabytesKsenia has ordinary pan scales and several weights of an equal mass. Ksenia has already put some weights on the scales, while other weights are untouched. Ksenia is now wondering whether it is possible to put all
阅读全文
Codeforce Round #224 Div2 C
摘要:C. Arithmetic Progressiontime limit per test 1 secondmemory limit per test 256 megabytesEverybody knows what an arithmetic progression is. Let us remind you just in case that an arithmetic progression is such sequence of numbers a1, a2, ..., an of length n, that the following condition fulfills:a2 -
阅读全文
Codechef January Challenge 2014 Bon Appetit
摘要:Bon AppetitProblem code: FGFSSubmitMy SubmissionsAll SubmissionsRead problems statements in Mandarin Chinese and Russian.Our chef has recently opened a new restaurant with a unique style. The restaurant is divided into K compartments (numbered from 1 to K) and each compartment can be occupied by at.
阅读全文
问题 H: x*x+y*y=z*z
摘要:问题 H: x*x+y*y=z*z时间限制: 1 Sec内存限制: 128 MB 提交: 109解决: 5 [提交][状态][讨论版]题目描述Given an odd positive integer x, calculate the smallest y, such that there is a...
阅读全文
Good Bye 2013 C
摘要:C. New Year Ratings Changetime limit per test 1 secondmemory limit per test 256 megabytesOne very well-known internet resource site (let's call it X) has come up with a New Year adventure. Specifically, they decided to give ratings to all visitors.There are n users on the site, for each user we
阅读全文
Good Bye 2013 B
摘要:B. New Year Presenttime limit per test 1 secondmemory limit per test 256 megabytesThe New Year is coming! That's why many people today are busy preparing New Year presents. Vasily the Programmer is no exception.Vasily knows that the best present is (no, it's not a contest) money. He's pu
阅读全文
Good Bye 2013 A
摘要:A. New Year Candlestime limit per test 1 secondmemory limit per test 256 megabytesVasily the Programmer loves romance, so this year he decided to illuminate his room with candles.Vasily has a candles.When Vasily lights up a new candle, it first burns for an hour and then it goes out. Vasily is smart
阅读全文
Good Bye 2013 D
摘要:D. New Year Lettertime limit per test 1 secondmemory limit per test 256 megabytesMany countries have such a New Year or Christmas tradition as writing a letter to Santa including a wish list for presents. Vasya is an ordinary programmer boy. Like all ordinary boys, he is going to write the letter to
阅读全文
Codeforce Round #222 Div2 B
摘要:B. Semifinalstime limit per test 1 secondmemory limit per test256 megabytesTwo semifinals have just been in the running tournament. Each semifinal had n participants. There are n participants advancing to the finals, they are chosen as follows: from each semifinal, we choose k people (0 ≤ 2k ≤ n) wh
阅读全文
Codeforce Round #222 Div2 A
摘要:A. Playing with Dicetime limit per test 1 secondmemory limit per test 256 megabytesTwo players are playing a game. First each of them writes an integer from 1 to 6, and then a dice is thrown. The player whose written number got closer to the number on the dice wins. If both payers have the same diff
阅读全文
Codeforce Round #222 Div2 C
摘要:C. Mazetime limit per test2 secondsmemory limit per test 256 megabytes添加X还要最后连通,等价于直接找最后连通剩余数!注意为0个XPavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another only if both cells are empty and have a common si
阅读全文
浙公网安备 33010602011771号