Codeforces Round 194 (Div. 1)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
333 Codeforces Round 194 (Div. 1) FINISHED False 7200 362784597 July 27, 2013, 8:30 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2660 ) B Chips PROGRAMMING greedy 1800

B"Gerald plays the following game. He has a checkered field of size n xe2 x80 x89 xc3 x97 xe2 x80 x89n cells, where m various cells are banned. Before the game, he has to put a few chips on some border (but not corner) board cells. Then for n xe2 x80 x89- xe2 x80 x891 minutes, Gerald every minute moves each chip into an adjacent cell. He moves each chip from its original edge to the opposite edge. Gerald loses in this game in each of the three cases: In that case he loses and earns 0 points. When nothing like that happened, he wins and earns the number of points equal to the number of chips he managed to put on the board. Help Gerald earn the most points. The first line contains two space-separated integers n and m (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the size of the field and the number of banned cells. Next m lines each contain two space-separated integers. Specifically, the i-th of these lines contains numbers xi and yi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi, xe2 x80 x89yi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the coordinates of the i-th banned cell. All given cells are distinct. Consider the field rows numbered from top to bottom from 1 to n, and the columns -- from left to right from 1 to n. Print a single integer -- the maximum points Gerald can earn in this game. In the first test the answer equals zero as we can't put chips into the corner cells. In the second sample we can place one chip into either cell (1, 2), or cell (3, 2), or cell (2, 1), or cell (2, 3). We cannot place two chips. In the third sample we can only place one chip into either cell (2, 1), or cell (2, 4)."...

Tutorials

Codeforces Round 194 — Editoral

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
4185728 Gassa B July 27, 2013, 10:23 a.m. OK D TESTS 20 186 307200 1800
4244387 Misha100896 B Aug. 8, 2013, 4:50 p.m. OK Delphi TESTS 20 30 0 1800
4179735 Frommi B July 27, 2013, 9:17 a.m. OK Delphi TESTS 20 30 819200 1800
4201199 AleksanderBalobanov B July 29, 2013, 8:09 p.m. OK Delphi TESTS 20 30 9113600 1800
4178942 ruban B July 27, 2013, 9:09 a.m. OK Delphi TESTS 20 62 12902400 1800
4187249 MrJigan1488 B July 27, 2013, 11:02 a.m. OK Delphi TESTS 20 404 31334400 1800
4209467 Manul B July 31, 2013, 1:15 p.m. OK FPC TESTS 20 30 0 1800
5379507 DMH B Dec. 8, 2013, 2:33 a.m. OK FPC TESTS 20 30 0 1800
5026533 yohshama B Nov. 8, 2013, 3:42 a.m. OK FPC TESTS 20 30 0 1800
4187098 Omelianenko B July 27, 2013, 10:57 a.m. OK FPC TESTS 20 30 0 1800
4327271 zscnash B Aug. 23, 2013, 3:58 a.m. OK FPC TESTS 20 30 102400 1800
5735674 Wolfik B Jan. 18, 2014, 7:13 p.m. OK FPC TESTS 20 60 0 1800
5654553 key.gal B Jan. 10, 2014, 2 p.m. OK FPC TESTS 20 62 0 1800
4275297 glky13 B Aug. 14, 2013, 1:31 a.m. OK FPC TESTS 20 62 0 1800
4181833 woot B July 27, 2013, 9:40 a.m. OK FPC TESTS 20 62 0 1800
4180628 chipchip3412 B July 27, 2013, 9:26 a.m. OK FPC TESTS 20 62 0 1800
4182216 darkshadows B July 27, 2013, 9:44 a.m. OK GNU C TESTS 20 62 0 1800
4391967 user_123 B Sept. 1, 2013, 8:50 a.m. OK GNU C TESTS 20 62 0 1800
4220269 cpy B Aug. 3, 2013, 10:20 a.m. OK GNU C TESTS 20 62 0 1800
18114842 TsReaper B May 27, 2016, 8:20 a.m. OK GNU C TESTS 20 62 3891200 1800
4184463 E478 B July 27, 2013, 10:09 a.m. OK GNU C TESTS 20 124 0 1800
4398536 aquamongoose B Sept. 2, 2013, 6:35 p.m. OK GNU C++ TESTS 20 30 0 1800
4196307 persianpars B July 28, 2013, 9:40 p.m. OK GNU C++ TESTS 20 30 0 1800
4186910 takapt B July 27, 2013, 10:53 a.m. OK GNU C++ TESTS 20 30 0 1800
4183318 zhudhjen B July 27, 2013, 9:57 a.m. OK GNU C++ TESTS 20 30 0 1800
4183270 Korvin79 B July 27, 2013, 9:56 a.m. OK GNU C++ TESTS 20 30 0 1800
4182861 dnk B July 27, 2013, 9:51 a.m. OK GNU C++ TESTS 20 30 0 1800
4179072 bad B July 27, 2013, 9:10 a.m. OK GNU C++ TESTS 20 30 0 1800
4178903 gen B July 27, 2013, 9:08 a.m. OK GNU C++ TESTS 20 30 0 1800
4178785 Ilya_MSU B July 27, 2013, 9:07 a.m. OK GNU C++ TESTS 20 30 0 1800
4178428 haas B July 27, 2013, 9:04 a.m. OK GNU C++ TESTS 20 30 0 1800
4195642 krzychusan B July 28, 2013, 4:22 p.m. OK GNU C++0x TESTS 20 30 0 1800
4195289 harhrayr B July 28, 2013, 2:42 p.m. OK GNU C++0x TESTS 20 30 0 1800
4194882 sokian B July 28, 2013, 1:11 p.m. OK GNU C++0x TESTS 20 30 0 1800
4185988 htc550605125 B July 27, 2013, 10:25 a.m. OK GNU C++0x TESTS 20 30 0 1800
4179165 evima B July 27, 2013, 9:11 a.m. OK GNU C++0x TESTS 20 30 0 1800
9959637 Dwylkz B Feb. 22, 2015, 1:26 p.m. OK GNU C++0x TESTS 20 62 0 1800
10286436 hakobyan.tigran B March 15, 2015, 10:37 a.m. OK GNU C++0x TESTS 20 62 0 1800
9913379 -XraY- B Feb. 18, 2015, 11:16 a.m. OK GNU C++0x TESTS 20 62 0 1800
8954032 soda_beta B Dec. 3, 2014, 2:48 p.m. OK GNU C++0x TESTS 20 62 0 1800
5502193 pikapika B Dec. 24, 2013, 12:30 p.m. OK GNU C++0x TESTS 20 62 0 1800
58545401 rainboy B Aug. 10, 2019, 4:20 p.m. OK GNU C11 TESTS 20 62 0 1800
11263154 jzm_mxlover B May 25, 2015, 10:28 a.m. OK GNU C++11 TESTS 20 30 0 1800
30626729 aya_elymany B Sept. 22, 2017, 10:55 p.m. OK GNU C++11 TESTS 20 62 0 1800
29684272 nologic B Aug. 22, 2017, 1:41 p.m. OK GNU C++11 TESTS 20 62 0 1800
22379829 DatTenNayChoNgan B Nov. 21, 2016, 9:11 a.m. OK GNU C++11 TESTS 20 62 0 1800
22379734 DatTenNayChoNgan B Nov. 21, 2016, 9:04 a.m. OK GNU C++11 TESTS 20 62 0 1800
21774849 Reventon B Oct. 25, 2016, 3:41 p.m. OK GNU C++11 TESTS 20 62 0 1800
19604833 aaijmrt B Aug. 3, 2016, 8:03 p.m. OK GNU C++11 TESTS 20 62 0 1800
61528471 VROOM_VARUN B Sept. 30, 2019, 1:03 a.m. OK GNU C++11 TESTS 20 62 0 1800
31942044 958abhijith B Nov. 1, 2017, 8:03 a.m. OK GNU C++11 TESTS 20 62 0 1800
42701986 Rye_Catcher B Sept. 9, 2018, 11:02 a.m. OK GNU C++11 TESTS 20 62 0 1800
31568724 Mr.Tree B Oct. 21, 2017, 11:17 a.m. OK GNU C++14 TESTS 20 62 1945600 1800
34106511 John_Titor B Jan. 12, 2018, 12:48 p.m. OK GNU C++14 TESTS 20 62 3481600 1800
51420916 necromancer_2304 B March 17, 2019, 4:27 p.m. OK GNU C++14 TESTS 20 92 0 1800
67666349 mota_haathi B Dec. 26, 2019, 6:02 p.m. OK GNU C++14 TESTS 20 92 0 1800
61356902 ish.ranga11 B Sept. 27, 2019, 10:48 a.m. OK GNU C++14 TESTS 20 92 0 1800
58630203 acvcvashcvhavcsascasvcad B Aug. 11, 2019, 7:22 p.m. OK GNU C++14 TESTS 20 92 0 1800
54532515 Mindjolt B May 23, 2019, 5:52 p.m. OK GNU C++14 TESTS 20 92 0 1800
51169553 asuraDK B March 11, 2019, 3:46 p.m. OK GNU C++14 TESTS 20 92 0 1800
50702010 Kar98k B March 2, 2019, 10:40 p.m. OK GNU C++14 TESTS 20 92 0 1800
48664565 Uzumaki_Narutoo B Jan. 21, 2019, 7:31 a.m. OK GNU C++14 TESTS 20 92 0 1800
52954628 farukkastamonuda B April 18, 2019, 1:17 p.m. OK GNU C++17 TESTS 20 92 0 1800
54228759 ruo B May 16, 2019, 7:46 a.m. OK GNU C++17 TESTS 20 92 0 1800
63741034 Juve45 B Oct. 29, 2019, 4:56 p.m. OK GNU C++17 TESTS 20 92 0 1800
54906174 aditya_sheth B June 1, 2019, 8:54 a.m. OK GNU C++17 TESTS 20 92 204800 1800
40454957 Ashishgup B July 16, 2018, 10:34 p.m. OK GNU C++17 TESTS 20 92 307200 1800
40461920 des1997 B July 17, 2018, 4:33 a.m. OK GNU C++17 TESTS 20 92 307200 1800
69711455 ST_C B Jan. 29, 2020, 7:13 a.m. OK GNU C++17 TESTS 20 92 307200 1800
60413163 ViciousCoder B Sept. 11, 2019, 11:47 p.m. OK GNU C++17 TESTS 20 92 307200 1800
58108331 the.mentalist B Aug. 1, 2019, 5:46 a.m. OK GNU C++17 TESTS 20 92 307200 1800
49933132 aaryandosaj B Feb. 15, 2019, 5:55 a.m. OK GNU C++17 TESTS 20 92 409600 1800
4200115 cojna B July 29, 2013, 2:45 p.m. OK Haskell TESTS 20 62 1638400 1800
4188119 autotaker B July 27, 2013, 11:41 a.m. OK Haskell TESTS 20 124 11571200 1800
4188149 autotaker B July 27, 2013, 11:43 a.m. OK Haskell TESTS 20 186 11571200 1800
4188226 autotaker B July 27, 2013, 11:47 a.m. OK Haskell TESTS 20 248 11571200 1800
69660984 kashishsingh8700 B Jan. 28, 2020, 9:24 a.m. OK Java 11 TESTS 20 686 0 1800
4199407 yano0oyan B July 29, 2013, 12:12 p.m. OK Java 6 TESTS 20 156 0 1800
4183472 hiukim B July 27, 2013, 9:59 a.m. OK Java 6 TESTS 20 186 0 1800
6425173 xiaowuc1 B April 20, 2014, 7:42 a.m. OK Java 6 TESTS 20 186 102400 1800
5957329 luckman B March 7, 2014, 2:05 p.m. OK Java 6 TESTS 20 186 102400 1800
4182661 Nox B July 27, 2013, 9:49 a.m. OK Java 6 TESTS 20 186 102400 1800
4321624 mkirsche B Aug. 21, 2013, 9:05 p.m. OK Java 6 TESTS 20 218 0 1800
4206290 Kentauros B July 30, 2013, 11:34 p.m. OK Java 6 TESTS 20 218 102400 1800
4179775 slycelote B July 27, 2013, 9:17 a.m. OK Java 6 TESTS 20 248 409600 1800
4187466 SkyFire B July 27, 2013, 11:10 a.m. OK Java 6 TESTS 20 280 0 1800
4191699 DoublePointer B July 27, 2013, 8:09 p.m. OK Java 6 TESTS 20 280 102400 1800
4199051 sonhuytran B July 29, 2013, 10:59 a.m. OK Java 7 TESTS 20 156 0 1800
4607559 mostafa_fahim B Sept. 29, 2013, 7:15 p.m. OK Java 7 TESTS 20 186 0 1800
4279024 watson B Aug. 14, 2013, 6:26 p.m. OK Java 7 TESTS 20 186 0 1800
4266973 yimocool B Aug. 11, 2013, 5:29 p.m. OK Java 7 TESTS 20 186 0 1800
4192556 rpk74m B July 28, 2013, 3:20 a.m. OK Java 7 TESTS 20 186 0 1800
4187582 phantom11 B July 27, 2013, 11:14 a.m. OK Java 7 TESTS 20 186 0 1800
4175940 Egor B July 27, 2013, 8:42 a.m. OK Java 7 TESTS 20 186 0 1800
4324988 KNIGHT0X300 B Aug. 22, 2013, 4:42 p.m. OK Java 7 TESTS 20 186 102400 1800
4241346 santjuan B Aug. 7, 2013, 11:10 p.m. OK Java 7 TESTS 20 186 204800 1800
4180688 tanzaku B July 27, 2013, 9:27 a.m. OK Java 7 TESTS 20 186 15872000 1800
57738362 jenish9599 B July 25, 2019, 10:39 a.m. OK Java 8 TESTS 20 218 0 1800
68882142 saurabhs1206 B Jan. 15, 2020, 7:17 p.m. OK Java 8 TESTS 20 248 0 1800
54563886 amolpratap007 B May 24, 2019, 3:20 p.m. OK Java 8 TESTS 20 248 0 1800
48687795 AJ47 B Jan. 21, 2019, 4:07 p.m. OK Java 8 TESTS 20 248 0 1800
47350017 StayAwayFromBitches B Dec. 22, 2018, 1:25 a.m. OK Java 8 TESTS 20 248 0 1800
47344962 Anonymous B Dec. 21, 2018, 7:15 p.m. OK Java 8 TESTS 20 248 0 1800
46292247 KulikAlex B Nov. 27, 2018, 8:49 p.m. OK Java 8 TESTS 20 248 0 1800
39957584 spar5h B July 4, 2018, 1:57 p.m. OK Java 8 TESTS 20 248 0 1800
32150927 7dan B Nov. 9, 2017, 4:29 a.m. OK Java 8 TESTS 20 248 0 1800
9300544 AStepanov B Dec. 29, 2014, 6:53 p.m. OK Java 8 TESTS 20 248 0 1800
52513651 hongquanntct B April 9, 2019, 2:50 a.m. OK Mono C# TESTS 20 216 6758400 1800
52513587 hongquanntct B April 9, 2019, 2:45 a.m. OK Mono C# TESTS 20 218 6758400 1800
52513621 hongquanntct B April 9, 2019, 2:48 a.m. OK Mono C# TESTS 20 248 6758400 1800
16052346 og.kostya B Feb. 16, 2016, 7:40 a.m. OK MS C# TESTS 20 92 204800 1800
4178240 marat.snowbear B July 27, 2013, 9:02 a.m. OK MS C# TESTS 20 124 2969600 1800
4180882 pnomarev B July 27, 2013, 9:29 a.m. OK MS C# TESTS 20 124 3072000 1800
4191069 ds88 B July 27, 2013, 4:58 p.m. OK MS C# TESTS 20 156 6963200 1800
4281426 mmaaxxw B Aug. 15, 2013, 9:46 a.m. OK MS C# TESTS 20 218 9011200 1800
4183174 NickSerg B July 27, 2013, 9:55 a.m. OK MS C# TESTS 20 280 5324800 1800
4329581 mylifefordota B Aug. 23, 2013, 3:23 p.m. OK MS C# TESTS 20 404 56012800 1800
4180954 HorgH B July 27, 2013, 9:30 a.m. OK MS C++ TESTS 20 30 0 1800
6461677 Scorpy B April 24, 2014, 4:24 p.m. OK MS C++ TESTS 20 60 0 1800
35807271 vjudge5 B March 1, 2018, 9:31 a.m. OK MS C++ TESTS 20 60 11366400 1800
5135619 alex.alex B Nov. 17, 2013, 8:23 p.m. OK MS C++ TESTS 20 62 0 1800
4608156 ds1371dani B Sept. 29, 2013, 9:03 p.m. OK MS C++ TESTS 20 62 0 1800
4416339 AlexandraLi B Sept. 7, 2013, 1:48 a.m. OK MS C++ TESTS 20 62 0 1800
11924871 sdya B July 4, 2015, 4:26 p.m. OK MS C++ TESTS 20 62 0 1800
10221284 Kazim B March 9, 2015, 7:58 p.m. OK MS C++ TESTS 20 62 0 1800
6990079 pjsdream B July 1, 2014, 6:42 a.m. OK MS C++ TESTS 20 62 0 1800
5401312 Timur_Sitdikov B Dec. 10, 2013, 5:53 a.m. OK MS C++ TESTS 20 62 0 1800
4239649 dc. B Aug. 7, 2013, 8:56 a.m. OK Ocaml TESTS 20 124 204800 1800
4247493 chaotic_iak B Aug. 9, 2013, 2:36 p.m. OK PHP TESTS 20 748 0 1800
4238290 ydc B Aug. 7, 2013, 12:20 a.m. OK Python 2 TESTS 20 498 1638400 1800
5231307 Unlenin B Nov. 24, 2013, 9:47 p.m. OK Python 2 TESTS 20 560 409600 1800
4240973 carvajal B Aug. 7, 2013, 5:56 p.m. OK Python 2 TESTS 20 560 1843200 1800
4337520 denis.samuylov B Aug. 25, 2013, 11:09 p.m. OK Python 2 TESTS 20 560 11468800 1800
4316328 Myungwoo B Aug. 20, 2013, 2:57 p.m. OK Python 2 TESTS 20 654 102400 1800
4187273 Artoemius B July 27, 2013, 11:03 a.m. OK Python 2 TESTS 20 748 512000 1800
4191729 TsunamiNoLetGo B July 27, 2013, 8:18 p.m. OK Python 3 TESTS 20 560 0 1800
49764337 vladalos B Feb. 11, 2019, 10:53 a.m. OK Python 3 TESTS 20 622 204800 1800
45983185 noelcowm B Nov. 20, 2018, 3:29 a.m. OK Python 3 TESTS 20 624 102400 1800
11438782 poikniok B June 5, 2015, 1:39 a.m. OK Python 3 TESTS 20 654 0 1800
5419237 yugle7 B Dec. 13, 2013, 8:27 a.m. OK Python 3 TESTS 20 654 0 1800
15915122 not_bot_but_POT B Feb. 9, 2016, 2 p.m. OK Python 3 TESTS 20 654 102400 1800
12992504 RiseAboveFailure B Sept. 14, 2015, 6:22 a.m. OK Python 3 TESTS 20 654 102400 1800
11672981 Vladik B June 19, 2015, 6:19 p.m. OK Python 3 TESTS 20 654 102400 1800
65278027 Claustrophobic_Penguin B Nov. 18, 2019, 3:20 a.m. OK Python 3 TESTS 20 654 204800 1800
35860330 ______u______ B March 2, 2018, 9:39 p.m. OK Python 3 TESTS 20 654 5836800 1800
4218682 howsiwei B Aug. 2, 2013, 8:39 p.m. OK Ruby TESTS 20 498 0 1800
4191656 limed B July 27, 2013, 7:53 p.m. OK Scala TESTS 20 780 409600 1800
4186545 limed B July 27, 2013, 10:29 a.m. OK Scala TESTS 20 780 512000 1800

remove filters

Back to search problems