Codeforces Round 127 (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
201 Codeforces Round 127 (Div. 1) FINISHED False 7200 390839399 June 29, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3012 ) A Clear Symmetry PROGRAMMING constructive algorithms dp math 1700

B"Consider some square matrix A with side n consisting of zeros and ones. There are n rows numbered from 1 to n from top to bottom and n columns numbered from 1 to n from left to right in this matrix. We'll denote the element of the matrix which is located at the intersection of the i-row and the j-th column as Ai, xe2 x80 x89j. Let's call matrix A clear if no two cells containing ones have a common side. Let's call matrix A symmetrical if it matches the matrices formed from it by a horizontal and/or a vertical reflection. Formally, for each pair (i, xe2 x80 x89j) (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i, xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) both of the following conditions must be met: Ai, xe2 x80 x89j xe2 x80 x89= xe2 x80 x89An xe2 x80 x89- xe2 x80 x89i xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89j and Ai, xe2 x80 x89j xe2 x80 x89= xe2 x80 x89Ai, xe2 x80 x89n xe2 x80 x89- xe2 x80 x89j xe2 x80 x89+ xe2 x80 x891. Let's define the sharpness of matrix A as the number of ones in it. Given integer x, your task is to find the smallest positive integer n such that there exists a clear symmetrical matrix A with side n and sharpness x. The only line contains a single integer x (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the required sharpness of the matrix. Print a single number -- the sought value of n. The figure below shows the matrices that correspond to the samples:"...

Tutorials

Разбор задач

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3233735 Mosyagin A March 3, 2013, 9:23 a.m. OK Delphi TESTS 100 15 102400 1700
2106717 TarasSavitskyi A Sept. 9, 2012, 3:30 p.m. OK Delphi TESTS 100 30 9420800 1700
1851417 Natali A July 3, 2012, 12:23 p.m. OK Delphi TESTS 100 30 9523200 1700
1847810 Ramp A July 1, 2012, 3:34 p.m. OK Delphi TESTS 100 30 9523200 1700
1847201 turkmen A July 1, 2012, 6:52 a.m. OK Delphi TESTS 100 30 9523200 1700
1846590 AleksanderBalobanov A June 30, 2012, 3:55 p.m. OK Delphi TESTS 100 30 9523200 1700
1845720 BTix A June 30, 2012, 8:13 a.m. OK Delphi TESTS 100 30 9523200 1700
1844129 markel888 A June 29, 2012, 6:09 p.m. OK Delphi TESTS 100 30 9523200 1700
1841493 NickAltair A June 29, 2012, 4:35 p.m. OK Delphi TESTS 100 30 9523200 1700
1995310 Shaykhutdinov-T-I A Aug. 9, 2012, 1:07 p.m. OK Delphi TESTS 100 30 9523200 1700
2826308 skrydg A Dec. 25, 2012, 4:02 p.m. OK FPC TESTS 100 15 0 1700
16033870 rere123 A Feb. 15, 2016, 1:53 p.m. OK FPC TESTS 100 30 0 1700
9009903 Felix_Mate A Dec. 7, 2014, 1:10 p.m. OK FPC TESTS 100 30 0 1700
4214408 Nik_Storm_2010 A Aug. 1, 2013, 2:21 p.m. OK FPC TESTS 100 30 0 1700
4213788 ZeRoGerc A Aug. 1, 2013, 12:12 p.m. OK FPC TESTS 100 30 0 1700
4213783 ZeRoGerc A Aug. 1, 2013, 12:12 p.m. OK FPC TESTS 100 30 0 1700
2065124 vlad107 A Aug. 28, 2012, 8:47 p.m. OK FPC TESTS 100 30 614400 1700
2050848 vilcheuski A Aug. 26, 2012, 7:12 p.m. OK FPC TESTS 100 30 1228800 1700
2043782 vjudge2 A Aug. 23, 2012, 3:31 a.m. OK FPC TESTS 100 30 1228800 1700
2043773 vjudge2 A Aug. 23, 2012, 3:20 a.m. OK FPC TESTS 100 30 1228800 1700
16066557 vjudge1 A Feb. 17, 2016, 6:25 a.m. OK GNU C TESTS 100 30 0 1700
15335588 hardiknegi A Jan. 13, 2016, 6:34 p.m. OK GNU C TESTS 100 30 0 1700
10439846 bnuvjudge2 A March 25, 2015, 1:07 p.m. OK GNU C TESTS 100 30 0 1700
7448873 vjudge4 A Aug. 15, 2014, 1:45 a.m. OK GNU C TESTS 100 30 0 1700
1905902 vjudge4 A July 17, 2012, 6:22 a.m. OK GNU C TESTS 100 30 1433600 1700
1881520 butterfly0923 A July 10, 2012, 10:49 a.m. OK GNU C TESTS 100 30 1433600 1700
1877287 cpy A July 9, 2012, 4:27 a.m. OK GNU C TESTS 100 30 1433600 1700
1840007 stubbscroll A June 29, 2012, 3:59 p.m. OK GNU C TESTS 100 30 1433600 1700
28377109 ishaanrakib4282 A July 8, 2017, 10:42 p.m. OK GNU C TESTS 100 30 1945600 1700
2636174 hariprasath A Nov. 24, 2012, 7:45 a.m. OK GNU C TESTS 100 31 0 1700
2090120 honsyt A Sept. 2, 2012, 12:23 p.m. OK GNU C++ TESTS 100 10 819200 1700
4930696 roben_76 A Oct. 29, 2013, 7:08 p.m. OK GNU C++ TESTS 100 15 0 1700
4167017 bjtuacm A July 26, 2013, 3:33 a.m. OK GNU C++ TESTS 100 15 0 1700
4166978 asdw12345 A July 26, 2013, 3:26 a.m. OK GNU C++ TESTS 100 15 0 1700
4166490 bjtuacm A July 26, 2013, 2:14 a.m. OK GNU C++ TESTS 100 15 0 1700
4147242 HeavnFeeL A July 24, 2013, 12:36 p.m. OK GNU C++ TESTS 100 15 0 1700
4144900 mohammadrdeh A July 24, 2013, 6:33 a.m. OK GNU C++ TESTS 100 15 0 1700
4143528 al2 A July 24, 2013, 12:37 a.m. OK GNU C++ TESTS 100 15 0 1700
4032782 eddycael A July 6, 2013, 11:28 p.m. OK GNU C++ TESTS 100 15 0 1700
4007274 yejinru A July 3, 2013, 3:55 p.m. OK GNU C++ TESTS 100 15 0 1700
3960933 A_Le_K A June 25, 2013, 4:52 p.m. OK GNU C++0x TESTS 100 15 0 1700
7556489 the_silliest A Aug. 23, 2014, 3:07 a.m. OK GNU C++0x TESTS 100 30 0 1700
7808429 zshi A Sept. 16, 2014, 11:20 a.m. OK GNU C++0x TESTS 100 30 0 1700
7559087 saichandu6 A Aug. 23, 2014, 10:51 a.m. OK GNU C++0x TESTS 100 30 0 1700
5640200 marat.snowbear A Jan. 8, 2014, 11:32 p.m. OK GNU C++0x TESTS 100 30 0 1700
4985478 No_stop A Nov. 4, 2013, 11:43 a.m. OK GNU C++0x TESTS 100 30 0 1700
4567773 yutaka1999 A Sept. 26, 2013, 2:25 p.m. OK GNU C++0x TESTS 100 30 0 1700
4405011 tsfn A Sept. 4, 2013, 11:56 a.m. OK GNU C++0x TESTS 100 30 0 1700
6439225 hos.lyric A April 22, 2014, 9:32 a.m. OK GNU C++0x TESTS 100 30 102400 1700
1920714 akashin A July 21, 2012, 7:02 p.m. OK GNU C++0x TESTS 100 30 1433600 1700
34289511 vjudge1 A Jan. 19, 2018, 2:25 a.m. OK GNU C11 TESTS 100 60 1843200 1700
69706429 vjudge2 A Jan. 29, 2020, 4:51 a.m. OK GNU C11 TESTS 100 62 0 1700
68644999 vjudge2 A Jan. 12, 2020, 8:46 a.m. OK GNU C11 TESTS 100 62 0 1700
68642126 vjudge3 A Jan. 12, 2020, 7:51 a.m. OK GNU C11 TESTS 100 62 0 1700
68683685 vjudge2 A Jan. 13, 2020, 1:37 a.m. OK GNU C11 TESTS 100 62 0 1700
32349649 vjudge1 A Nov. 16, 2017, 7:55 a.m. OK GNU C++11 TESTS 100 30 0 1700
32349587 vjudge4 A Nov. 16, 2017, 7:52 a.m. OK GNU C++11 TESTS 100 30 0 1700
26831438 laomiXD A May 4, 2017, 9:31 a.m. OK GNU C++11 TESTS 100 30 0 1700
27568191 afaji321 A June 4, 2017, 5:21 p.m. OK GNU C++11 TESTS 100 30 0 1700
22717019 kingofnumbers A Dec. 5, 2016, 5:56 p.m. OK GNU C++11 TESTS 100 30 0 1700
22392389 Velter A Nov. 21, 2016, 9:09 p.m. OK GNU C++11 TESTS 100 30 0 1700
20548858 RVS A Sept. 12, 2016, 12:39 p.m. OK GNU C++11 TESTS 100 30 0 1700
20401432 max333 A Sept. 5, 2016, 2:01 p.m. OK GNU C++11 TESTS 100 30 0 1700
20352503 vist0r A Sept. 3, 2016, 4:22 a.m. OK GNU C++11 TESTS 100 30 0 1700
32358625 zhwdaniel A Nov. 16, 2017, 3:01 p.m. OK GNU C++11 TESTS 100 30 0 1700
29505994 vjudge4 A Aug. 16, 2017, 1:07 p.m. OK GNU C++14 TESTS 100 30 0 1700
65149983 teamcaproxx A Nov. 16, 2019, 7:05 a.m. OK GNU C++14 TESTS 100 30 0 1700
32349509 vjudge3 A Nov. 16, 2017, 7:47 a.m. OK GNU C++14 TESTS 100 30 0 1700
30547578 gprano A Sept. 20, 2017, 1:51 p.m. OK GNU C++14 TESTS 100 30 0 1700
30016266 NiverdPereira A Sept. 2, 2017, 3:46 p.m. OK GNU C++14 TESTS 100 30 0 1700
30012134 darkknight896 A Sept. 2, 2017, 11:53 a.m. OK GNU C++14 TESTS 100 30 0 1700
29706710 danya.smelskiy A Aug. 23, 2017, 12:16 p.m. OK GNU C++14 TESTS 100 30 0 1700
29596168 Rizon_Sunny A Aug. 19, 2017, 11 a.m. OK GNU C++14 TESTS 100 30 0 1700
27581398 hitman623 A June 5, 2017, 11:08 a.m. OK GNU C++14 TESTS 100 30 0 1700
27536196 TooDumbToWin A June 3, 2017, 5:05 a.m. OK GNU C++14 TESTS 100 30 0 1700
35869922 vjudge5 A March 3, 2018, 6:16 a.m. OK GNU C++17 TESTS 100 30 1945600 1700
69691288 kid_maksikkk A Jan. 28, 2020, 6:41 p.m. OK GNU C++17 TESTS 100 60 0 1700
48541524 neeleshsinha A Jan. 18, 2019, 4:59 p.m. OK GNU C++17 TESTS 100 60 204800 1700
68646921 vjudge2 A Jan. 12, 2020, 9:23 a.m. OK GNU C++17 TESTS 100 62 0 1700
68640514 vjudge2 A Jan. 12, 2020, 7:22 a.m. OK GNU C++17 TESTS 100 62 0 1700
69223940 Shrey2809 A Jan. 21, 2020, 6:16 a.m. OK GNU C++17 TESTS 100 62 0 1700
69956519 arsrivish2 A Feb. 1, 2020, 10:16 a.m. OK GNU C++17 TESTS 100 62 0 1700
69181138 kannav.1 A Jan. 20, 2020, 10:12 a.m. OK GNU C++17 TESTS 100 62 0 1700
69180816 Triansh A Jan. 20, 2020, 10:04 a.m. OK GNU C++17 TESTS 100 62 0 1700
69067406 chirag7145 A Jan. 18, 2020, 7:19 p.m. OK GNU C++17 TESTS 100 62 0 1700
36534225 ntnguyen A March 23, 2018, 2:56 p.m. OK GNU C++17 Diagnostics TESTS 100 1902 99430400 1700
6137318 betaveros A March 25, 2014, 11:32 a.m. OK Haskell TESTS 100 30 0 1700
68943135 ashanksingh1997 A Jan. 16, 2020, 3:07 p.m. OK Java 11 TESTS 100 404 0 1700
2236394 hama-du A Sept. 24, 2012, 9:10 a.m. OK Java 6 TESTS 100 93 0 1700
2456333 mingotlik A Oct. 28, 2012, 3:21 p.m. OK Java 6 TESTS 100 109 0 1700
1907579 Sammarize A July 17, 2012, 5:32 p.m. OK Java 6 TESTS 100 110 43212800 1700
1845991 Kornacker A June 30, 2012, 10:50 a.m. OK Java 6 TESTS 100 110 43212800 1700
2070518 jonathanirvings A Aug. 31, 2012, 2:46 a.m. OK Java 6 TESTS 100 110 45056000 1700
1847206 javanetbeans A July 1, 2012, 7:18 a.m. OK Java 6 TESTS 100 130 43212800 1700
1904935 uwi A July 16, 2012, 6:33 p.m. OK Java 6 TESTS 100 130 43212800 1700
1846314 anhdt A June 30, 2012, 1:55 p.m. OK Java 6 TESTS 100 130 43212800 1700
1845779 kryll A June 30, 2012, 8:33 a.m. OK Java 6 TESTS 100 130 43212800 1700
1851812 SergeyLazarev A July 3, 2012, 3:16 p.m. OK Java 6 TESTS 100 130 43212800 1700
3904102 rancho A June 16, 2013, 6:48 a.m. OK Java 7 TESTS 100 78 0 1700
4032562 LLL.A A July 6, 2013, 8:39 p.m. OK Java 7 TESTS 100 78 0 1700
3751941 santjuan A May 21, 2013, 3:58 a.m. OK Java 7 TESTS 100 78 0 1700
5602090 miguelmaurizio A Jan. 2, 2014, 4:44 a.m. OK Java 7 TESTS 100 124 0 1700
1845417 malcolm A June 30, 2012, 5:48 a.m. OK Java 7 TESTS 100 130 44953600 1700
1844491 OutSide A June 29, 2012, 6:50 p.m. OK Java 7 TESTS 100 130 44953600 1700
1839994 tanzaku A June 29, 2012, 3:59 p.m. OK Java 7 TESTS 100 130 44953600 1700
1839763 mmaxio A June 29, 2012, 3:53 p.m. OK Java 7 TESTS 100 130 44953600 1700
1844347 Jokser A June 29, 2012, 6:24 p.m. OK Java 7 TESTS 100 130 45158400 1700
1843853 dalex A June 29, 2012, 6 p.m. OK Java 7 TESTS 100 130 45363200 1700
27104503 pitfall A May 14, 2017, 10:13 a.m. OK Java 8 TESTS 100 218 0 1700
12728639 sweiss A Aug. 28, 2015, 8:22 a.m. OK Java 8 TESTS 100 218 0 1700
30236750 7dan A Sept. 10, 2017, 2:41 a.m. OK Java 8 TESTS 100 248 0 1700
40471492 octopusPrime A July 17, 2018, 9:44 a.m. OK Java 8 TESTS 100 248 0 1700
13963113 lydxlx A Oct. 31, 2015, 2:36 a.m. OK Java 8 TESTS 100 248 0 1700
19812125 Omar_Kojak A Aug. 11, 2016, 8:14 p.m. OK Java 8 TESTS 100 248 20480000 1700
58203736 applemelon A Aug. 3, 2019, 5:58 a.m. OK Java 8 TESTS 100 278 0 1700
40471789 octopusPrime A July 17, 2018, 9:52 a.m. OK Java 8 TESTS 100 278 0 1700
23386156 rahulkhairwar A Dec. 28, 2016, 8:06 p.m. OK Java 8 TESTS 100 278 20582400 1700
68727252 adarsh000321 A Jan. 13, 2020, 6:23 p.m. OK Java 8 TESTS 100 280 0 1700
1895984 fatest A July 13, 2012, 2:07 a.m. OK Mono C# TESTS 100 730 13004800 1700
1840262 it4.kp A June 29, 2012, 4:05 p.m. OK Mono C# TESTS 100 830 11776000 1700
3698210 XilinX A May 10, 2013, 5:50 a.m. OK MS C# TESTS 100 46 204800 1700
16032071 og.kostya A Feb. 15, 2016, 11:52 a.m. OK MS C# TESTS 100 122 204800 1700
8212159 FilipVesovic A Oct. 12, 2014, 8:55 p.m. OK MS C# TESTS 100 122 204800 1700
8212157 VladaMG98 A Oct. 12, 2014, 8:55 p.m. OK MS C# TESTS 100 122 204800 1700
23640316 camypaper A Jan. 8, 2017, 5:38 a.m. OK MS C# TESTS 100 154 9113600 1700
3072744 ali.mashreghi A Feb. 5, 2013, 12:15 a.m. OK MS C++ TESTS 100 15 0 1700
3856014 Kianoosh A June 11, 2013, 5:29 a.m. OK MS C++ TESTS 100 15 0 1700
3761472 Reshetnikov_Ivan Barsuk_Alexey atnurgaliev A May 23, 2013, 2:19 p.m. OK MS C++ TESTS 100 15 0 1700
3696480 r13 A May 9, 2013, 2:25 p.m. OK MS C++ TESTS 100 15 0 1700
3695777 bobrdobr A May 9, 2013, 10:45 a.m. OK MS C++ TESTS 100 15 0 1700
3690491 neko13 19891101 kuangbin A May 7, 2013, 1:12 p.m. OK MS C++ TESTS 100 15 0 1700
3479012 RAD A April 6, 2013, 7:34 a.m. OK MS C++ TESTS 100 15 0 1700
3144878 Svyat A Feb. 18, 2013, 9:03 p.m. OK MS C++ TESTS 100 15 0 1700
3014944 vjudge5 A Jan. 27, 2013, 5:33 a.m. OK MS C++ TESTS 100 15 0 1700
2957523 Fasterm A Jan. 18, 2013, 6:24 p.m. OK MS C++ TESTS 100 15 0 1700
9496647 rsFalse A Jan. 21, 2015, 9:25 p.m. OK Perl TESTS 100 62 0 1700
9496703 rsFalse A Jan. 21, 2015, 9:38 p.m. OK Perl TESTS 100 62 0 1700
12738012 NgocHai A Aug. 29, 2015, 3:13 a.m. OK PyPy 2 TESTS 100 154 0 1700
12738013 vjudge3 A Aug. 29, 2015, 3:14 a.m. OK PyPy 2 TESTS 100 156 0 1700
38993924 Patiala_Peg A June 6, 2018, 12:03 p.m. OK PyPy 2 TESTS 100 186 0 1700
56867206 anshuman16423 A July 12, 2019, 3:58 a.m. OK PyPy 2 TESTS 100 436 0 1700
49949724 vjudge5 A Feb. 15, 2019, 1:33 p.m. OK PyPy 3 TESTS 100 248 0 1700
50769018 homoeconomicus A March 4, 2019, 2:20 a.m. OK PyPy 3 TESTS 100 280 0 1700
58959430 kopok2 A Aug. 17, 2019, 2:30 p.m. OK PyPy 3 TESTS 100 280 0 1700
2093255 nealzane A Sept. 3, 2012, 3:19 p.m. OK Python 2 TESTS 100 60 2457600 1700
1845424 test007 A June 30, 2012, 5:53 a.m. OK Python 2 TESTS 100 110 2969600 1700
1850939 kachayev A July 3, 2012, 8:29 a.m. OK Python 2 TESTS 100 110 2969600 1700
1844147 Ixanezis A June 29, 2012, 6:10 p.m. OK Python 2 TESTS 100 110 2969600 1700
16685981 vjudge5 A March 13, 2016, 5:54 a.m. OK Python 2 TESTS 100 122 0 1700
12742559 vjudge1 A Aug. 29, 2015, 11:17 a.m. OK Python 2 TESTS 100 124 0 1700
12742509 vjudge4 A Aug. 29, 2015, 11:13 a.m. OK Python 2 TESTS 100 124 0 1700
12342188 mjf A Aug. 4, 2015, 6:42 p.m. OK Python 2 TESTS 100 124 0 1700
7567277 pushedx A Aug. 24, 2014, 2:30 p.m. OK Python 2 TESTS 100 124 0 1700
1851047 ProCoder A July 3, 2012, 9:25 a.m. OK Python 2 TESTS 100 130 2969600 1700
3691850 neko13 A May 7, 2013, 11:52 p.m. OK Python 3 TESTS 100 78 102400 1700
32491329 FutureTwT A Nov. 20, 2017, 6:54 a.m. OK Python 3 TESTS 100 124 0 1700
30040911 423555290 A Sept. 3, 2017, 5:55 p.m. OK Python 3 TESTS 100 124 0 1700
13298855 Constantor A Sept. 29, 2015, 1:56 p.m. OK Python 3 TESTS 100 124 0 1700
6687547 yugle7 A May 23, 2014, 1:19 p.m. OK Python 3 TESTS 100 124 0 1700
5420241 aradhya_makkar A Dec. 13, 2013, 12:26 p.m. OK Python 3 TESTS 100 124 0 1700
5499524 TsunamiNoLetGo A Dec. 24, 2013, 12:13 a.m. OK Python 3 TESTS 100 124 307200 1700
35217390 MQstafa A Feb. 13, 2018, 7:51 p.m. OK Python 3 TESTS 100 124 5632000 1700
32491337 vjudge2 A Nov. 20, 2017, 6:54 a.m. OK Python 3 TESTS 100 154 0 1700
22207625 vjudge2 A Nov. 14, 2016, 12:59 p.m. OK Python 3 TESTS 100 154 0 1700
2071028 makrusak A Aug. 31, 2012, 8:46 a.m. OK Ruby TESTS 100 110 5222400 1700
15914056 not_bot_but_POT A Feb. 9, 2016, 1:38 p.m. OK Ruby TESTS 100 124 204800 1700
1866600 Nakilon A July 5, 2012, 12:08 p.m. OK Ruby TESTS 100 140 5734400 1700
1840428 osa_k A June 29, 2012, 4:09 p.m. OK Ruby TESTS 100 140 5734400 1700
41231394 vjudge4 A Aug. 5, 2018, 3:20 a.m. OK Ruby TESTS 100 154 102400 1700
57273422 sorry_im_smurfing A July 18, 2019, 9:49 a.m. OK Ruby TESTS 100 154 204800 1700
35844263 ______u______ A March 2, 2018, 3:26 p.m. OK Ruby TESTS 100 154 6451200 1700
35844232 ______n______ A March 2, 2018, 3:26 p.m. OK Ruby TESTS 100 154 6451200 1700
35844054 _____i_____ A March 2, 2018, 3:22 p.m. OK Ruby TESTS 100 154 6451200 1700
35844051 _____k_____ A March 2, 2018, 3:22 p.m. OK Ruby TESTS 100 154 6451200 1700

remove filters

Back to search problems