Codeforces Round 642 (Div. 3)

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
1353 Codeforces Round 642 (Div. 3) FINISHED False 7200 142356299 May 14, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 35679 ) C Board Moves PROGRAMMING math 1000

B'You are given a board of size n x n , where n is odd (not divisible by 2 ). Initially, each cell of the board contains one figure. In one move, you can select exactly one figure presented in some cell and move it to one of the cells sharing a side or a corner with the current cell, i.e. from the cell (i, j) you can move the figure to cells: Of course, you can not move figures to cells out of the board. It is allowed that after a move there will be several figures in one cell. Your task is to find the minimum number of moves needed to get all the figures into one cell (i.e. n^2-1 cells should contain 0 figures and one cell should contain n^2 figures). You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 200 ) -- the number of test cases. Then t test cases follow. The only line of the test case contains one integer n ( 1 <= n < 5 cdot 10^5 ) -- the size of the board. It is guaranteed that n is odd (not divisible by 2 ). It is guaranteed that the sum of n over all test cases does not exceed 5 cdot 10^5 ( sum n <= 5 cdot 10^5 ). For each test case print the answer -- the minimum number of moves needed to get all the figures into one cell. '...

Tutorials

Codeforces Round #642 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
81659218 rohanchandra C May 27, 2020, 11:24 p.m. OK GNU C11 TESTS 7 15 0 1000
81310925 Cutest C May 24, 2020, 3:51 p.m. OK GNU C11 TESTS 7 15 0 1000
81149123 jbushra781 C May 24, 2020, 8:34 a.m. OK GNU C11 TESTS 7 15 0 1000
81059385 nitinkumar1729 C May 24, 2020, 4:17 a.m. OK GNU C11 TESTS 7 15 0 1000
81002160 yigezhe C May 23, 2020, 9:42 a.m. OK GNU C11 TESTS 7 15 0 1000
80816284 ak5147 C May 21, 2020, 2:57 a.m. OK GNU C11 TESTS 7 15 0 1000
80767154 RHasanR C May 20, 2020, 11:25 a.m. OK GNU C11 TESTS 7 15 0 1000
80758887 mesumit C May 20, 2020, 9:35 a.m. OK GNU C11 TESTS 7 15 0 1000
80706835 igmyeongyoon C May 19, 2020, 4:04 p.m. OK GNU C11 TESTS 7 15 0 1000
80658508 Itsmdshahin C May 19, 2020, 5:59 a.m. OK GNU C11 TESTS 7 15 0 1000
81095464 _phogat.007 C May 24, 2020, 5:56 a.m. OK GNU C++11 TESTS 7 15 0 1000
81612360 Banty C May 27, 2020, 11:33 a.m. OK GNU C++11 TESTS 7 15 0 1000
81610169 radlid C May 27, 2020, 11:07 a.m. OK GNU C++11 TESTS 7 15 0 1000
81618582 shubham_bitsg C May 27, 2020, 12:38 p.m. OK GNU C++11 TESTS 7 15 0 1000
81376409 dheerajtiwari C May 25, 2020, 11:18 a.m. OK GNU C++11 TESTS 7 15 0 1000
81373757 luogu_bot2 C May 25, 2020, 10:47 a.m. OK GNU C++11 TESTS 7 15 0 1000
81173109 vjudge4 C May 24, 2020, noon OK GNU C++11 TESTS 7 15 0 1000
81166247 REuncripted C May 24, 2020, 10:25 a.m. OK GNU C++11 TESTS 7 15 0 1000
81154080 utsavparakhiya C May 24, 2020, 9:26 a.m. OK GNU C++11 TESTS 7 15 0 1000
81095820 patildevang04 C May 24, 2020, 6 a.m. OK GNU C++11 TESTS 7 15 0 1000
80970172 JAQUEN_HGAR C May 22, 2020, 9:03 p.m. OK GNU C++14 TESTS 7 15 0 1000
81571644 s_02 C May 27, 2020, 1:12 a.m. OK GNU C++14 TESTS 7 15 0 1000
81446893 ejoi2019medal C May 26, 2020, 7:31 a.m. OK GNU C++14 TESTS 7 15 0 1000
81373971 anup0507 C May 25, 2020, 10:49 a.m. OK GNU C++14 TESTS 7 15 0 1000
81370194 TheUnavoidable C May 25, 2020, 10:03 a.m. OK GNU C++14 TESTS 7 15 0 1000
81363779 omg_pankaj C May 25, 2020, 8:42 a.m. OK GNU C++14 TESTS 7 15 0 1000
81033487 intealam96 C May 23, 2020, 4:56 p.m. OK GNU C++14 TESTS 7 15 0 1000
81018744 vjudge1 C May 23, 2020, 1:41 p.m. OK GNU C++14 TESTS 7 15 0 1000
81004851 stemanbaratheon C May 23, 2020, 10:22 a.m. OK GNU C++14 TESTS 7 15 0 1000
80972540 ak1389 C May 22, 2020, 10:12 p.m. OK GNU C++14 TESTS 7 15 0 1000
81663956 nofuck C May 28, 2020, 2:29 a.m. OK GNU C++17 TESTS 7 15 0 1000
81414808 maverick11 C May 25, 2020, 6:59 p.m. OK GNU C++17 TESTS 7 15 0 1000
81408257 yashar_sb_sb C May 25, 2020, 5:49 p.m. OK GNU C++17 TESTS 7 15 0 1000
81334883 ryan10145 C May 24, 2020, 10:11 p.m. OK GNU C++17 TESTS 7 15 0 1000
81329849 kimbbakar C May 24, 2020, 7:57 p.m. OK GNU C++17 TESTS 7 15 0 1000
81327584 element04519 C May 24, 2020, 7:15 p.m. OK GNU C++17 TESTS 7 15 0 1000
81322494 Sourin0903 C May 24, 2020, 5:57 p.m. OK GNU C++17 TESTS 7 15 0 1000
81174585 adityapathak1630 C May 24, 2020, 12:21 p.m. OK GNU C++17 TESTS 7 15 0 1000
81152012 hugowxyz C May 24, 2020, 8:59 a.m. OK GNU C++17 TESTS 7 15 0 1000
81146127 Violet_FXH C May 24, 2020, 8:07 a.m. OK GNU C++17 TESTS 7 15 0 1000
81667136 Israt_Jahan_R C May 28, 2020, 3:43 a.m. OK GNU C++17 (64) TESTS 7 15 0 1000
81703824 sanya_jain C May 28, 2020, 12:19 p.m. OK GNU C++17 (64) TESTS 7 15 0 1000
81680201 Edwivv C May 28, 2020, 7:19 a.m. OK GNU C++17 (64) TESTS 7 15 0 1000
81381965 Dgeka24 C May 25, 2020, 12:24 p.m. OK GNU C++17 (64) TESTS 7 15 0 1000
81345904 hemanth4474 C May 25, 2020, 4:23 a.m. OK GNU C++17 (64) TESTS 7 15 0 1000
81341769 errorgorn C May 25, 2020, 2:38 a.m. OK GNU C++17 (64) TESTS 7 15 0 1000
81096388 mahmoudbadawy C May 24, 2020, 6:08 a.m. OK GNU C++17 (64) TESTS 7 15 0 1000
80995269 _Black_RM_Diamond_ C May 23, 2020, 7:56 a.m. OK GNU C++17 (64) TESTS 7 15 0 1000
80666650 MrBrionix C May 19, 2020, 8:02 a.m. OK GNU C++17 (64) TESTS 7 15 0 1000
80636670 AnDrewHAliEm C May 18, 2020, 7:52 p.m. OK GNU C++17 (64) TESTS 7 15 0 1000
81433154 lamvh2812 C May 26, 2020, 3:40 a.m. OK Go TESTS 7 30 0 1000
80931736 retired_ C May 22, 2020, 12:05 p.m. OK Go TESTS 7 31 0 1000
80749691 Tconan C May 20, 2020, 7:21 a.m. OK Go TESTS 7 31 0 1000
80634125 serhatgiydiren C May 18, 2020, 7:10 p.m. OK Go TESTS 7 31 0 1000
81426781 Tconan C May 26, 2020, 12:26 a.m. OK Go TESTS 7 31 102400 1000
80221921 rahahm C May 15, 2020, 11:55 a.m. OK Go TESTS 7 31 10649600 1000
80220127 sonlh07 C May 15, 2020, 11:35 a.m. OK Go TESTS 7 31 10649600 1000
80208976 synapse C May 15, 2020, 9:19 a.m. OK Go TESTS 7 31 23756800 1000
81032439 LuosKrad C May 23, 2020, 4:42 p.m. OK Go TESTS 7 46 0 1000
80749661 Tconan C May 20, 2020, 7:20 a.m. OK Go TESTS 7 46 0 1000
80263781 Laurens C May 15, 2020, 9:17 p.m. OK Haskell TESTS 7 31 13824000 1000
80187841 MiltonEiji C May 15, 2020, 3:35 a.m. OK Haskell TESTS 7 46 16998400 1000
81143397 Akag C May 24, 2020, 7:43 a.m. OK Java 11 TESTS 7 156 0 1000
80600455 throughHell C May 18, 2020, 12:14 p.m. OK Java 11 TESTS 7 156 23859200 1000
80150265 Ranesha C May 14, 2020, 4:26 p.m. OK Java 11 TESTS 7 156 23859200 1000
80170161 vikasyadav8750 C May 14, 2020, 7:30 p.m. OK Java 11 TESTS 7 170 23756800 1000
80179740 Hulkq C May 14, 2020, 11:33 p.m. OK Java 11 TESTS 7 170 23859200 1000
80151984 EigenFunk C May 14, 2020, 4:30 p.m. OK Java 11 TESTS 7 170 23859200 1000
80555622 Kimo_Fathy C May 17, 2020, 9:34 p.m. OK Java 11 TESTS 7 170 23961600 1000
80540243 devesh08 C May 17, 2020, 4:54 p.m. OK Java 11 TESTS 7 170 23961600 1000
81425018 lovelyDay C May 25, 2020, 11:08 p.m. OK Java 11 TESTS 7 171 0 1000
81046284 xster C May 23, 2020, 8:14 p.m. OK Java 11 TESTS 7 171 0 1000
80191237 punit99iitd C May 15, 2020, 4:46 a.m. OK Java 8 TESTS 7 92 20480000 1000
81048194 goldcode8 C May 23, 2020, 8:56 p.m. OK Java 8 TESTS 7 93 0 1000
81362435 glider.g C May 25, 2020, 8:25 a.m. OK Java 8 TESTS 7 93 5734400 1000
80270114 luchy0120 C May 16, 2020, 1:03 a.m. OK Java 8 TESTS 7 93 20377600 1000
80260095 MohammadAmjad C May 15, 2020, 7:59 p.m. OK Java 8 TESTS 7 93 20377600 1000
80225195 Shatakshi C May 15, 2020, 12:34 p.m. OK Java 8 TESTS 7 93 20480000 1000
80215161 harshittrivedi1 C May 15, 2020, 10:37 a.m. OK Java 8 TESTS 7 93 20480000 1000
80166255 prem_cse C May 14, 2020, 6:32 p.m. OK Java 8 TESTS 7 93 20480000 1000
80153080 MAVabjb C May 14, 2020, 4:33 p.m. OK Java 8 TESTS 7 93 20480000 1000
80230825 horseprabhat625 C May 15, 2020, 1:42 p.m. OK Java 8 TESTS 7 93 21196800 1000
80873176 Clowyy C May 21, 2020, 4:50 p.m. OK Kotlin TESTS 7 93 0 1000
80161811 koboshi C May 14, 2020, 5:36 p.m. OK Kotlin TESTS 7 93 20480000 1000
80300751 mt_kuma C May 16, 2020, 9:44 a.m. OK Kotlin TESTS 7 108 20582400 1000
81703679 whiter4bbit C May 28, 2020, 12:18 p.m. OK Kotlin TESTS 7 109 0 1000
81395014 Kap_Knight C May 25, 2020, 2:59 p.m. OK Kotlin TESTS 7 109 0 1000
81144709 scnucjh C May 24, 2020, 7:54 a.m. OK Kotlin TESTS 7 109 0 1000
80716495 abdurauf1997 C May 19, 2020, 6:05 p.m. OK Kotlin TESTS 7 109 0 1000
80300231 mt_kuma C May 16, 2020, 9:38 a.m. OK Kotlin TESTS 7 109 20582400 1000
80804149 MadMax C May 20, 2020, 7:52 p.m. OK Kotlin TESTS 7 124 0 1000
80525519 IsTinG C May 17, 2020, 1:51 p.m. OK Kotlin TESTS 7 124 20582400 1000
81409189 jankmet C May 25, 2020, 5:53 p.m. OK Mono C# TESTS 7 46 0 1000
80395138 peterc C May 16, 2020, 4:35 p.m. OK Mono C# TESTS 7 46 8294400 1000
80200403 1Tim30n3 C May 15, 2020, 7:20 a.m. OK Mono C# TESTS 7 46 8294400 1000
80971801 abd_alrhman_ C May 22, 2020, 9:48 p.m. OK Mono C# TESTS 7 61 0 1000
80211454 TRR C May 15, 2020, 9:50 a.m. OK Mono C# TESTS 7 61 8396800 1000
80624357 SkyWind213 C May 18, 2020, 4:49 p.m. OK Mono C# TESTS 7 62 0 1000
80968333 GusztavSzmolik C May 22, 2020, 8:21 p.m. OK Mono C# TESTS 7 62 204800 1000
80963652 treasuryonly C May 22, 2020, 6:54 p.m. OK Mono C# TESTS 7 62 204800 1000
80295553 sakapon C May 16, 2020, 8:39 a.m. OK Mono C# TESTS 7 62 11980800 1000
80299522 sakapon C May 16, 2020, 9:29 a.m. OK Mono C# TESTS 7 77 11980800 1000
80289286 vjudge1 C May 16, 2020, 7:22 a.m. OK MS C++ TESTS 7 15 3891200 1000
80816615 Hokage. C May 21, 2020, 3:05 a.m. OK MS C++ TESTS 7 30 0 1000
80295043 BaseFrame C May 16, 2020, 8:33 a.m. OK MS C++ TESTS 7 30 3891200 1000
80914594 atharv_de_co-der C May 22, 2020, 8:16 a.m. OK MS C++ TESTS 7 31 0 1000
81174960 vjudge1 C May 24, 2020, 12:25 p.m. OK MS C++ TESTS 7 31 0 1000
81004788 atharv_de_co-der C May 23, 2020, 10:21 a.m. OK MS C++ TESTS 7 31 0 1000
80160741 CFWudanna C May 14, 2020, 5:24 p.m. OK MS C++ TESTS 7 31 3891200 1000
80377699 riversu C May 16, 2020, 2:09 p.m. OK MS C++ TESTS 7 31 3891200 1000
80200834 mostafa_gamal_564 C May 15, 2020, 7:26 a.m. OK MS C++ TESTS 7 31 3891200 1000
80156597 Alanaxixi C May 14, 2020, 4:47 p.m. OK MS C++ TESTS 7 46 4096000 1000
80933945 vjudge3 C May 22, 2020, 12:34 p.m. OK MS C++ 2017 TESTS 7 15 307200 1000
80300500 WithYou0919 C May 16, 2020, 9:41 a.m. OK MS C++ 2017 TESTS 7 15 3686400 1000
80211402 enthucoder C May 15, 2020, 9:50 a.m. OK MS C++ 2017 TESTS 7 15 3686400 1000
80253106 Nestifff C May 15, 2020, 6:15 p.m. OK MS C++ 2017 TESTS 7 15 3686400 1000
80592632 ayuhero31 C May 18, 2020, 10:38 a.m. OK MS C++ 2017 TESTS 7 15 3686400 1000
80163754 Wolf_Cub C May 14, 2020, 5:59 p.m. OK MS C++ 2017 TESTS 7 15 3686400 1000
80687760 msaidzengin C May 19, 2020, 12:39 p.m. OK MS C++ 2017 TESTS 7 30 0 1000
81170036 vjudge1 C May 24, 2020, 11:19 a.m. OK MS C++ 2017 TESTS 7 30 0 1000
81627135 nilayaagarwal C May 27, 2020, 2:15 p.m. OK MS C++ 2017 TESTS 7 30 0 1000
80404902 a.asbjoernsen C May 16, 2020, 6:22 p.m. OK MS C++ 2017 TESTS 7 30 3686400 1000
80234838 Arturgo C May 15, 2020, 2:27 p.m. OK Ocaml TESTS 7 46 7987200 1000
81590518 SPQR C May 27, 2020, 7 a.m. OK PHP TESTS 7 46 0 1000
81369608 SPQR C May 25, 2020, 9:55 a.m. OK PHP TESTS 7 46 409600 1000
80180213 Khaled_Mohamed C May 14, 2020, 11:53 p.m. OK PHP TESTS 7 46 6041600 1000
80180236 Khaled_Mohamed C May 14, 2020, 11:53 p.m. OK PHP TESTS 7 62 6041600 1000
80183376 itsme297 C May 15, 2020, 1:37 a.m. OK PyPy 2 TESTS 7 109 23552000 1000
80895540 yumtam C May 22, 2020, 2:13 a.m. OK PyPy 2 TESTS 7 124 0 1000
80174980 flyman3046 C May 14, 2020, 9:04 p.m. OK PyPy 2 TESTS 7 124 23347200 1000
80164632 Devraj10 C May 14, 2020, 6:10 p.m. OK PyPy 2 TESTS 7 171 24780800 1000
81363770 slijk C May 25, 2020, 8:42 a.m. OK PyPy 3 TESTS 7 124 0 1000
80779918 BaskakovNikita C May 20, 2020, 2:14 p.m. OK PyPy 3 TESTS 7 124 0 1000
80267337 alexia_martinez C May 15, 2020, 11:05 p.m. OK PyPy 3 TESTS 7 124 20172800 1000
80258616 amarjeet_singh C May 15, 2020, 7:33 p.m. OK PyPy 3 TESTS 7 124 20172800 1000
80233810 ego_madrasi C May 15, 2020, 2:16 p.m. OK PyPy 3 TESTS 7 124 20172800 1000
80210887 Harry_potter3107 C May 15, 2020, 9:43 a.m. OK PyPy 3 TESTS 7 124 20172800 1000
80196409 dx_dy_dz C May 15, 2020, 6:24 a.m. OK PyPy 3 TESTS 7 124 20172800 1000
80177712 dominator1234 C May 14, 2020, 10:17 p.m. OK PyPy 3 TESTS 7 124 20172800 1000
80168251 pk_2809 C May 14, 2020, 7 p.m. OK PyPy 3 TESTS 7 124 20172800 1000
80159860 mcdx9524 C May 14, 2020, 5:15 p.m. OK PyPy 3 TESTS 7 124 20172800 1000
80236447 mokshasood06 C May 15, 2020, 2:44 p.m. OK Python 2 TESTS 7 171 6451200 1000
80151057 nis1992 C May 14, 2020, 4:28 p.m. OK Python 2 TESTS 7 171 6451200 1000
80154327 encrypted123 C May 14, 2020, 4:34 p.m. OK Python 2 TESTS 7 187 6451200 1000
80243736 Mike10 C May 15, 2020, 4:14 p.m. OK Python 2 TESTS 7 217 10649600 1000
80875000 mmascari2017 C May 21, 2020, 5:15 p.m. OK Python 2 TESTS 7 249 0 1000
80541159 Alcabel C May 17, 2020, 5:07 p.m. OK Python 2 TESTS 7 249 6451200 1000
80158796 ap1008 C May 14, 2020, 5:05 p.m. OK Python 2 TESTS 7 296 10649600 1000
81650574 pakshi_141199 C May 27, 2020, 7:18 p.m. OK Python 3 TESTS 7 93 0 1000
81454259 Subroto_kumar C May 26, 2020, 9:08 a.m. OK Python 3 TESTS 7 93 0 1000
81432431 ankitkk31 C May 26, 2020, 3:22 a.m. OK Python 3 TESTS 7 93 0 1000
81357530 Glezok C May 25, 2020, 7:20 a.m. OK Python 3 TESTS 7 93 0 1000
81356923 tkst C May 25, 2020, 7:12 a.m. OK Python 3 TESTS 7 93 0 1000
81142326 MR.GENIUS_209 C May 24, 2020, 7:35 a.m. OK Python 3 TESTS 7 93 0 1000
81032964 LuosKrad C May 23, 2020, 4:49 p.m. OK Python 3 TESTS 7 93 0 1000
80625875 elrion018 C May 18, 2020, 5:10 p.m. OK Python 3 TESTS 7 93 0 1000
80621937 Raufur_7770 C May 18, 2020, 4:20 p.m. OK Python 3 TESTS 7 93 0 1000
80533424 Exploud C May 17, 2020, 3:24 p.m. OK Python 3 TESTS 7 93 6656000 1000
80519396 eugene.l C May 17, 2020, 12:26 p.m. OK Ruby TESTS 7 171 6348800 1000
80255737 one_feeble_coder C May 15, 2020, 6:51 p.m. OK Rust TESTS 7 30 3788800 1000
81400507 pandrei C May 25, 2020, 4:05 p.m. OK Rust TESTS 7 31 0 1000
80744887 itsnotme C May 20, 2020, 6:07 a.m. OK Rust TESTS 7 31 307200 1000
81590019 springroll C May 27, 2020, 6:54 a.m. OK Rust TESTS 7 31 3174400 1000
80541540 garciparedes C May 17, 2020, 5:12 p.m. OK Rust TESTS 7 31 3788800 1000
80182277 sansen C May 15, 2020, 1:03 a.m. OK Rust TESTS 7 31 3788800 1000
80264794 TomazGomes C May 15, 2020, 9:44 p.m. OK Rust TESTS 7 31 7782400 1000
81393323 kihen C May 25, 2020, 2:40 p.m. OK Rust TESTS 7 46 0 1000
80264873 TomazGomes C May 15, 2020, 9:46 p.m. OK Rust TESTS 7 46 7782400 1000
80151244 IvanDyachenko C May 14, 2020, 4:29 p.m. OK Scala TESTS 7 421 31334400 1000

remove filters

Back to search problems