Codeforces Round 756 (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
1611 Codeforces Round 756 (Div. 3) FINISHED False 8100 93972299 Nov. 25, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 31582 ) A Make Even PROGRAMMING constructive algorithms math 800

B"Polycarp has an integer n that doesn't contain the digit 0. He can do the following operation with his number several (possibly zero) times: Note that for different operations, the values of l can be different. The number l can be equal to the length of the number n -- in this case, the whole number n is reversed. Polycarp loves even numbers. Therefore, he wants to make his number even. At the same time, Polycarp is very impatient. He wants to do as few operations as possible. Help Polycarp. Determine the minimum number of operations he needs to perform with the number n to make it even or determine that this is impossible. You need to answer t independent test cases. The first line contains the number t ( 1 <= t <= 10^4 ) -- the number of test cases. Each of the following t lines contains one integer n ( 1 <= n < 10^9 ). It is guaranteed that the given number doesn't contain the digit 0. Print t lines. On each line print one integer -- the answer to the corresponding test case. If it is impossible to make an even number, print -1. In the first test case, n=3876 , which is already an even number. Polycarp doesn't need to do anything, so the answer is 0 . In the second test case, n=387 . Polycarp needs to do 2 operations: It can be shown that 2 is the minimum possible number of operations that Polycarp needs to do with his number to make it even. In the third test case, n=4489 . Polycarp can reverse the whole number (choose a prefix of length l=4 ). It will become 9844 and this is an even number. In the fourth test case, n=3 . No matter how hard Polycarp tried, he would not be able to make an even number. "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
136959619 Asliddin A Nov. 26, 2021, 4:12 a.m. OK Clang++17 Diagnostics TESTS 9 46 0 800
136948478 ssvb A Nov. 25, 2021, 10:15 p.m. OK D TESTS 9 15 0 800
136967964 bnurgeldiyev514 A Nov. 26, 2021, 6:30 a.m. OK GNU C11 TESTS 9 15 0 800
137080267 Hemanth21 A Nov. 27, 2021, 2:49 a.m. OK GNU C11 TESTS 9 15 0 800
136979366 llj21 A Nov. 26, 2021, 8:54 a.m. OK GNU C11 TESTS 9 31 0 800
137080963 Vnnm A Nov. 27, 2021, 3:04 a.m. OK GNU C11 TESTS 9 31 0 800
136936884 parthu A Nov. 25, 2021, 6:12 p.m. OK GNU C11 TESTS 9 31 0 800
137087321 Anik203745 A Nov. 27, 2021, 5:04 a.m. OK GNU C11 TESTS 9 31 0 800
137085033 Ittesam A Nov. 27, 2021, 4:29 a.m. OK GNU C11 TESTS 9 31 0 800
136968271 Pawan_Lahoti A Nov. 26, 2021, 6:34 a.m. OK GNU C11 TESTS 9 31 0 800
136972290 daslaskdlsad A Nov. 26, 2021, 7:25 a.m. OK GNU C11 TESTS 9 31 0 800
136972365 nasa. A Nov. 26, 2021, 7:26 a.m. OK GNU C11 TESTS 9 31 0 800
137054110 srinivas.akkaldev A Nov. 26, 2021, 4:02 p.m. OK GNU C++14 TESTS 9 0 0 800
137091185 SHAshankgi A Nov. 27, 2021, 5:53 a.m. OK GNU C++14 TESTS 9 0 0 800
137086007 gamic1234 A Nov. 27, 2021, 4:45 a.m. OK GNU C++14 TESTS 9 0 0 800
137079992 ch_hui A Nov. 27, 2021, 2:42 a.m. OK GNU C++14 TESTS 9 0 0 800
137069109 kaffarell A Nov. 26, 2021, 8:03 p.m. OK GNU C++14 TESTS 9 0 0 800
137054517 professor_mmm A Nov. 26, 2021, 4:08 p.m. OK GNU C++14 TESTS 9 0 0 800
137052151 spongebobsquareroot A Nov. 26, 2021, 3:35 p.m. OK GNU C++14 TESTS 9 0 0 800
137024591 _BuZz A Nov. 26, 2021, 12:34 p.m. OK GNU C++14 TESTS 9 0 0 800
136982954 Land_ER A Nov. 26, 2021, 9:40 a.m. OK GNU C++14 TESTS 9 0 0 800
136982799 ss_loves_AC A Nov. 26, 2021, 9:38 a.m. OK GNU C++14 TESTS 9 0 0 800
137054535 swift51385 A Nov. 26, 2021, 4:08 p.m. OK GNU C++17 TESTS 9 0 0 800
137060868 LMNTRIX115 A Nov. 26, 2021, 5:36 p.m. OK GNU C++17 TESTS 9 0 0 800
137064511 cerenn A Nov. 26, 2021, 6:34 p.m. OK GNU C++17 TESTS 9 0 0 800
137066527 4_fun A Nov. 26, 2021, 7:09 p.m. OK GNU C++17 TESTS 9 0 0 800
137066533 M_ohamed_Nabil A Nov. 26, 2021, 7:09 p.m. OK GNU C++17 TESTS 9 0 0 800
137071531 Maxwell01 A Nov. 26, 2021, 9:07 p.m. OK GNU C++17 TESTS 9 0 0 800
137073667 TEKA A Nov. 26, 2021, 10:25 p.m. OK GNU C++17 TESTS 9 0 0 800
137075114 nguyendanghien A Nov. 26, 2021, 11:44 p.m. OK GNU C++17 TESTS 9 0 0 800
137081587 proverbs1_7 A Nov. 27, 2021, 3:18 a.m. OK GNU C++17 TESTS 9 0 0 800
137085511 devanshumishra543 A Nov. 27, 2021, 4:36 a.m. OK GNU C++17 TESTS 9 0 0 800
137040731 FIFO_ A Nov. 26, 2021, 1:50 p.m. OK GNU C++17 (64) TESTS 9 0 0 800
136985983 GreenTourist A Nov. 26, 2021, 10:24 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
136984623 ujjwalkrishna A Nov. 26, 2021, 10:04 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
136978128 akshaykhandelwal A Nov. 26, 2021, 8:40 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
136975924 lbm364dl A Nov. 26, 2021, 8:14 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
136973995 alwyn A Nov. 26, 2021, 7:48 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
136972316 Anish_28 A Nov. 26, 2021, 7:25 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
136966970 dblark A Nov. 26, 2021, 6:18 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
137064267 mesc08 A Nov. 26, 2021, 6:29 p.m. OK GNU C++17 (64) TESTS 9 0 0 800
136964979 srinjoy_ray A Nov. 26, 2021, 5:49 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
136975184 ritikrai A Nov. 26, 2021, 8:05 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
137089420 kshyp_hrshita A Nov. 27, 2021, 5:31 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
137070021 BtSky A Nov. 26, 2021, 8:26 p.m. OK GNU C++20 (64) TESTS 9 0 0 800
137049535 igorfardoc A Nov. 26, 2021, 3:04 p.m. OK GNU C++20 (64) TESTS 9 0 0 800
137011924 Neophron A Nov. 26, 2021, 11:56 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
136989275 arvindr9 A Nov. 26, 2021, 11:09 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
136985423 Skurrl A Nov. 26, 2021, 10:16 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
136984886 HodaKamal A Nov. 26, 2021, 10:08 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
136982072 wowsuchempty A Nov. 26, 2021, 9:29 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
136964437 MUMA_HEAd_ A Nov. 26, 2021, 5:41 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
137048107 SadFriedRice A Nov. 26, 2021, 2:49 p.m. OK Go TESTS 9 233 409600 800
136969104 120405217 A Nov. 26, 2021, 6:45 a.m. OK Go TESTS 9 280 409600 800
136971302 dex37 A Nov. 26, 2021, 7:12 a.m. OK Java 11 TESTS 9 171 0 800
136963572 solo07 A Nov. 26, 2021, 5:29 a.m. OK Java 11 TESTS 9 171 0 800
136957367 bhusalaniket100 A Nov. 26, 2021, 3:23 a.m. OK Java 11 TESTS 9 171 0 800
136946882 MrOtter A Nov. 25, 2021, 9:20 p.m. OK Java 11 TESTS 9 171 0 800
136941333 solo07 A Nov. 25, 2021, 7:19 p.m. OK Java 11 TESTS 9 186 0 800
137013736 Bekiy A Nov. 26, 2021, 12:01 p.m. OK Java 11 TESTS 9 186 0 800
136975934 hakr_2104 A Nov. 26, 2021, 8:14 a.m. OK Java 11 TESTS 9 186 0 800
136975241 Sarvjeet619 A Nov. 26, 2021, 8:05 a.m. OK Java 11 TESTS 9 186 0 800
136965032 BiggEr. A Nov. 26, 2021, 5:50 a.m. OK Java 11 TESTS 9 186 0 800
137048139 MoonCoder1234 A Nov. 26, 2021, 2:50 p.m. OK Java 11 TESTS 9 187 0 800
136970291 Vishnu750 A Nov. 26, 2021, 6:59 a.m. OK Java 8 TESTS 9 93 0 800
136937726 tishrah_ A Nov. 25, 2021, 6:24 p.m. OK Java 8 TESTS 9 93 0 800
137047113 ayafayed A Nov. 26, 2021, 2:39 p.m. OK Java 8 TESTS 9 109 0 800
136964984 Rohinth A Nov. 26, 2021, 5:49 a.m. OK Java 8 TESTS 9 109 0 800
136972259 K0ka A Nov. 26, 2021, 7:24 a.m. OK Java 8 TESTS 9 139 0 800
136943356 omar_mohammed A Nov. 25, 2021, 7:57 p.m. OK Java 8 TESTS 9 140 0 800
136982999 ppatel A Nov. 26, 2021, 9:41 a.m. OK Java 8 TESTS 9 155 0 800
136982559 ppatel A Nov. 26, 2021, 9:35 a.m. OK Java 8 TESTS 9 155 0 800
136948267 Maikyh04 A Nov. 25, 2021, 10:07 p.m. OK Java 8 TESTS 9 155 0 800
137091965 shauryagarg A Nov. 27, 2021, 6:02 a.m. OK Java 8 TESTS 9 156 0 800
136939024 PavelChadnov A Nov. 25, 2021, 6:42 p.m. OK Kotlin 1.4 TESTS 9 156 0 800
136938928 PavelChadnov A Nov. 25, 2021, 6:41 p.m. OK Kotlin 1.4 TESTS 9 249 0 800
136953459 sorry_dujinyvluori A Nov. 26, 2021, 1:48 a.m. OK Kotlin 1.5 TESTS 9 233 0 800
136939295 retanar A Nov. 25, 2021, 6:46 p.m. OK Kotlin 1.5 TESTS 9 249 0 800
136958606 weijun.guo A Nov. 26, 2021, 3:49 a.m. OK MS C++ 2017 TESTS 9 15 0 800
136950210 Ronaldo9711 A Nov. 25, 2021, 11:39 p.m. OK MS C++ 2017 TESTS 9 15 0 800
137081040 capability_Wu A Nov. 27, 2021, 3:06 a.m. OK MS C++ 2017 TESTS 9 30 0 800
136949747 fatant A Nov. 25, 2021, 11:13 p.m. OK MS C++ 2017 TESTS 9 30 0 800
136945051 jayesh_j0shi A Nov. 25, 2021, 8:32 p.m. OK MS C++ 2017 TESTS 9 30 0 800
136977799 mohd.zaid.123786 A Nov. 26, 2021, 8:36 a.m. OK MS C++ 2017 TESTS 9 31 0 800
137089747 892827956 A Nov. 27, 2021, 5:35 a.m. OK MS C++ 2017 TESTS 9 46 0 800
136980711 tzh123 A Nov. 26, 2021, 9:11 a.m. OK MS C++ 2017 TESTS 9 46 0 800
136965690 Huehuehue277353 A Nov. 26, 2021, 6:01 a.m. OK MS C++ 2017 TESTS 9 46 0 800
136964361 rokirovochka A Nov. 26, 2021, 5:40 a.m. OK MS C++ 2017 TESTS 9 46 0 800
137063142 pixellateddev A Nov. 26, 2021, 6:10 p.m. OK Node.js TESTS 9 171 5017600 800
137059369 zj85 A Nov. 26, 2021, 5:15 p.m. OK PHP TESTS 9 93 0 800
136961563 iamskp A Nov. 26, 2021, 4:51 a.m. OK PyPy 3 TESTS 9 109 3584000 800
137016372 tflave A Nov. 26, 2021, 12:09 p.m. OK PyPy 3 TESTS 9 124 4710400 800
136957436 kals A Nov. 26, 2021, 3:24 a.m. OK PyPy 3 TESTS 9 140 5529600 800
137065054 wolfram_ A Nov. 26, 2021, 6:43 p.m. OK PyPy 3 TESTS 9 140 6041600 800
136936940 Abheet_007 A Nov. 25, 2021, 6:13 p.m. OK PyPy 3 TESTS 9 171 7782400 800
136951434 DippleThree A Nov. 26, 2021, 12:38 a.m. OK PyPy 3 TESTS 9 233 6144000 800
136983585 hansirchen A Nov. 26, 2021, 9:49 a.m. OK PyPy 3 TESTS 9 233 6451200 800
137054654 manabananza A Nov. 26, 2021, 4:10 p.m. OK PyPy 3 TESTS 9 234 5632000 800
136936446 zayn. A Nov. 25, 2021, 6:07 p.m. OK PyPy 3 TESTS 9 234 9216000 800
137054976 Akuja A Nov. 26, 2021, 4:14 p.m. OK PyPy 3 TESTS 9 249 6246400 800
136947389 AbduSharif A Nov. 25, 2021, 9:37 p.m. OK PyPy 3-64 TESTS 9 77 5939200 800
136946147 radoan.sharkar.richi A Nov. 25, 2021, 8:59 p.m. OK PyPy 3-64 TESTS 9 93 8089600 800
136971420 laplce A Nov. 26, 2021, 7:14 a.m. OK PyPy 3-64 TESTS 9 108 9420800 800
136936785 queme A Nov. 25, 2021, 6:11 p.m. OK PyPy 3-64 TESTS 9 108 9932800 800
136997155 VN.Kiet A Nov. 26, 2021, 11:25 a.m. OK PyPy 3-64 TESTS 9 124 7680000 800
136942056 rivnam A Nov. 25, 2021, 7:31 p.m. OK PyPy 3-64 TESTS 9 124 8499200 800
136985034 eban12 A Nov. 26, 2021, 10:10 a.m. OK PyPy 3-64 TESTS 9 124 9728000 800
136939524 eban12 A Nov. 25, 2021, 6:50 p.m. OK PyPy 3-64 TESTS 9 124 9728000 800
136983702 nicku123 A Nov. 26, 2021, 9:51 a.m. OK PyPy 3-64 TESTS 9 140 9932800 800
136935639 kl.nei A Nov. 25, 2021, 5:56 p.m. OK PyPy 3-64 TESTS 9 186 9830400 800
136947111 elistark A Nov. 25, 2021, 9:27 p.m. OK Python 2 TESTS 9 46 0 800
137072236 eugalt A Nov. 26, 2021, 9:30 p.m. OK Python 3 TESTS 9 46 307200 800
136973575 ereitblat A Nov. 26, 2021, 7:42 a.m. OK Python 3 TESTS 9 46 307200 800
136956837 songmingi A Nov. 26, 2021, 3:12 a.m. OK Python 3 TESTS 9 61 0 800
136983828 sudhirMTS A Nov. 26, 2021, 9:53 a.m. OK Python 3 TESTS 9 61 409600 800
137072005 eugalt A Nov. 26, 2021, 9:22 p.m. OK Python 3 TESTS 9 62 307200 800
137007344 NS3081992 A Nov. 26, 2021, 11:45 a.m. OK Python 3 TESTS 9 77 102400 800
136950958 srikanthreddy691 A Nov. 26, 2021, 12:17 a.m. OK Python 3 TESTS 9 77 307200 800
136980328 hemz A Nov. 26, 2021, 9:06 a.m. OK Python 3 TESTS 9 78 0 800
136976550 caan_do A Nov. 26, 2021, 8:22 a.m. OK Python 3 TESTS 9 78 0 800
137052730 qkimov A Nov. 26, 2021, 3:43 p.m. OK Python 3 TESTS 9 92 0 800
136954463 magurofly A Nov. 26, 2021, 2:16 a.m. OK Ruby 3 TESTS 9 295 102400 800
136967056 mikaelrocks A Nov. 26, 2021, 6:19 a.m. OK Rust TESTS 9 15 0 800
136943994 sansen A Nov. 25, 2021, 8:10 p.m. OK Rust TESTS 9 15 307200 800

remove filters

Back to search problems