Codeforces Round 743 (Div. 2)

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
1573 Codeforces Round 743 (Div. 2) FINISHED False 7200 105290663 Sept. 18, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21284 ) A Countdown PROGRAMMING greedy 800

B"You are given a digital clock with n digits. Each digit shows an integer from 0 to 9 , so the whole clock shows an integer from 0 to 10^n-1 . The clock will show leading zeroes if the number is smaller than 10^{n-1} . You want the clock to show 0 with as few operations as possible. In an operation, you can do one of the following: Your task is to determine the minimum number of operations needed to make the clock show 0 . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^3 ). The first line of each test case contains a single integer n ( 1 <= n <= 100 ) -- number of digits on the clock. The second line of each test case contains a string of n digits s_1, s_2, ldots, s_n ( 0 <= s_1, s_2, ldots, s_n <= 9 ) -- the number on the clock. Note: If the number is smaller than 10^{n-1} the clock will show leading zeroes. For each test case, print one integer: the minimum number of operations needed to make the clock show 0 . In the first example, it's optimal to just decrease the number 7 times. In the second example, we can first swap the first and last position and then decrease the number by 1 . In the third example, the clock already shows 0 , so we don't have to perform any operations. "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
129229091 milan_s1 A Sept. 19, 2021, 3:32 a.m. OK GNU C11 TESTS 15 15 3686400 800
129203959 SunShine11 A Sept. 18, 2021, 4:19 p.m. OK GNU C11 TESTS 15 15 3686400 800
129202328 parasellitushar A Sept. 18, 2021, 4:11 p.m. OK GNU C11 TESTS 15 15 3686400 800
129198909 sriram7781 A Sept. 18, 2021, 3:55 p.m. OK GNU C11 TESTS 15 15 3686400 800
129203594 Sharannya_Ghosh A Sept. 18, 2021, 4:17 p.m. OK GNU C11 TESTS 15 30 3686400 800
129203252 praneeth_p_nairy A Sept. 18, 2021, 4:15 p.m. OK GNU C11 TESTS 15 30 3686400 800
129228000 SP2003 A Sept. 19, 2021, 2:59 a.m. OK GNU C11 TESTS 15 30 3686400 800
129201759 XFY333 A Sept. 18, 2021, 4:09 p.m. OK GNU C11 TESTS 15 30 3686400 800
129198330 yaswanthreddy A Sept. 18, 2021, 3:52 p.m. OK GNU C11 TESTS 15 30 3686400 800
129217690 Mrgglock A Sept. 18, 2021, 8:04 p.m. OK GNU C11 TESTS 15 30 3686400 800
129194184 Mahmoudalebrahim A Sept. 18, 2021, 3:31 p.m. OK GNU C++14 TESTS 15 15 3686400 800
129228147 yiwu A Sept. 19, 2021, 3:04 a.m. OK GNU C++14 TESTS 15 15 3686400 800
129193692 mr9815450774 A Sept. 18, 2021, 3:29 p.m. OK GNU C++14 TESTS 15 15 3686400 800
129223480 liankewei A Sept. 19, 2021, 12:03 a.m. OK GNU C++14 TESTS 15 15 3686400 800
129212872 vasiljevic3 A Sept. 18, 2021, 6:37 p.m. OK GNU C++14 TESTS 15 15 3788800 800
129228096 Momo_zzz A Sept. 19, 2021, 3:02 a.m. OK GNU C++14 TESTS 15 15 3788800 800
129229822 charan45 A Sept. 19, 2021, 3:53 a.m. OK GNU C++14 TESTS 15 15 3891200 800
129229251 aidanmkim A Sept. 19, 2021, 3:37 a.m. OK GNU C++14 TESTS 15 15 3891200 800
129227418 codeowsum-19 A Sept. 19, 2021, 2:41 a.m. OK GNU C++14 TESTS 15 15 3891200 800
129232852 g_one124 A Sept. 19, 2021, 5:09 a.m. OK GNU C++14 TESTS 15 15 3891200 800
129190839 nasharite A Sept. 18, 2021, 3:19 p.m. OK GNU C++17 TESTS 15 15 3788800 800
129193316 sach0499 A Sept. 18, 2021, 3:28 p.m. OK GNU C++17 TESTS 15 15 3788800 800
129195510 AnkitRupal A Sept. 18, 2021, 3:37 p.m. OK GNU C++17 TESTS 15 15 3788800 800
129199114 abhishek_456 A Sept. 18, 2021, 3:56 p.m. OK GNU C++17 TESTS 15 15 3788800 800
129203684 chhh2017 A Sept. 18, 2021, 4:18 p.m. OK GNU C++17 TESTS 15 15 3788800 800
129205464 prashantpk A Sept. 18, 2021, 4:27 p.m. OK GNU C++17 TESTS 15 15 3788800 800
129221159 racsosabe A Sept. 18, 2021, 9:40 p.m. OK GNU C++17 TESTS 15 15 3788800 800
129227924 acccccccc A Sept. 19, 2021, 2:57 a.m. OK GNU C++17 TESTS 15 15 3788800 800
129227967 hanhantie A Sept. 19, 2021, 2:58 a.m. OK GNU C++17 TESTS 15 15 3788800 800
129192274 DarkWind A Sept. 18, 2021, 3:24 p.m. OK GNU C++17 TESTS 15 15 3788800 800
129214302 sanket- A Sept. 18, 2021, 6:59 p.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129234751 sudan_sahab A Sept. 19, 2021, 5:55 a.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129232022 mj_riffu A Sept. 19, 2021, 4:49 a.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129228646 Boboge A Sept. 19, 2021, 3:19 a.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129228573 HunterKasa A Sept. 19, 2021, 3:17 a.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129225135 jjjjssss6 A Sept. 19, 2021, 1:20 a.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129224202 augg1e A Sept. 19, 2021, 12:39 a.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129216697 arora_kshitiz A Sept. 18, 2021, 7:42 p.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129216274 iamgaurav A Sept. 18, 2021, 7:34 p.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129213957 Wisehacks A Sept. 18, 2021, 6:53 p.m. OK GNU C++17 (64) TESTS 15 15 4300800 800
129211963 Sisodia-Saurabh A Sept. 18, 2021, 6:24 p.m. OK Go TESTS 15 46 10649600 800
129230961 sahit A Sept. 19, 2021, 4:22 a.m. OK Java 11 TESTS 15 171 23859200 800
129234855 unfixedbug A Sept. 19, 2021, 5:57 a.m. OK Java 11 TESTS 15 187 23859200 800
129232706 iamsoumik A Sept. 19, 2021, 5:05 a.m. OK Java 11 TESTS 15 202 23756800 800
129193650 Leminspector A Sept. 18, 2021, 3:29 p.m. OK Java 11 TESTS 15 202 23756800 800
129196662 iamsoumik A Sept. 18, 2021, 3:43 p.m. OK Java 11 TESTS 15 202 23859200 800
129191242 V15go A Sept. 18, 2021, 3:20 p.m. OK Java 11 TESTS 15 202 23859200 800
129230482 sumit.dhull610 A Sept. 19, 2021, 4:10 a.m. OK Java 11 TESTS 15 202 23859200 800
129194654 r_i_t_i_k_1 A Sept. 18, 2021, 3:33 p.m. OK Java 11 TESTS 15 202 23961600 800
129210233 b2jena A Sept. 18, 2021, 5:56 p.m. OK Java 11 TESTS 15 202 43929600 800
129221236 raves A Sept. 18, 2021, 9:44 p.m. OK Java 11 TESTS 15 217 23859200 800
129213869 aashay_03 A Sept. 18, 2021, 6:52 p.m. OK Java 8 TESTS 15 108 20480000 800
129194474 fortune95 A Sept. 18, 2021, 3:32 p.m. OK Java 8 TESTS 15 109 20480000 800
129194959 gyanrebind4u A Sept. 18, 2021, 3:34 p.m. OK Java 8 TESTS 15 109 20480000 800
129234037 dogranmol A Sept. 19, 2021, 5:38 a.m. OK Java 8 TESTS 15 109 20480000 800
129216029 atreyvishwas50 A Sept. 18, 2021, 7:30 p.m. OK Java 8 TESTS 15 109 20480000 800
129197634 aastha.chauhan01 A Sept. 18, 2021, 3:49 p.m. OK Java 8 TESTS 15 109 20480000 800
129190542 pgthebigshot A Sept. 18, 2021, 3:18 p.m. OK Java 8 TESTS 15 124 20275200 800
129219343 anubhav44044 A Sept. 18, 2021, 8:45 p.m. OK Java 8 TESTS 15 124 20377600 800
129196573 yashpandey73 A Sept. 18, 2021, 3:43 p.m. OK Java 8 TESTS 15 124 20480000 800
129209268 therealvyshnavkarun A Sept. 18, 2021, 5:44 p.m. OK Java 8 TESTS 15 139 20480000 800
129194971 v01d_p0150n A Sept. 18, 2021, 3:34 p.m. OK Kotlin TESTS 15 124 20582400 800
129195613 amanpatel23 A Sept. 18, 2021, 3:38 p.m. OK Kotlin TESTS 15 124 20992000 800
129199112 dextron99 A Sept. 18, 2021, 3:56 p.m. OK Kotlin TESTS 15 155 21504000 800
129201499 alisher17 A Sept. 18, 2021, 4:07 p.m. OK Kotlin TESTS 15 187 21811200 800
129203086 Krantzy A Sept. 18, 2021, 4:15 p.m. OK Kotlin TESTS 15 202 23347200 800
129191822 Yosiky A Sept. 18, 2021, 3:22 p.m. OK MS C++ 2017 TESTS 15 15 3686400 800
129195432 DalabayAbilay A Sept. 18, 2021, 3:37 p.m. OK MS C++ 2017 TESTS 15 15 3686400 800
129203207 Integration A Sept. 18, 2021, 4:15 p.m. OK MS C++ 2017 TESTS 15 15 3788800 800
129195366 vvzagorovskiy A Sept. 18, 2021, 3:36 p.m. OK MS C++ 2017 TESTS 15 30 3686400 800
129234574 kirill2000 A Sept. 19, 2021, 5:51 a.m. OK MS C++ 2017 TESTS 15 30 3788800 800
129192628 CN_Sheldon A Sept. 18, 2021, 3:25 p.m. OK MS C++ 2017 TESTS 15 31 3686400 800
129203813 F.O.X. A Sept. 18, 2021, 4:18 p.m. OK MS C++ 2017 TESTS 15 31 3686400 800
129202095 ravi_jhabit A Sept. 18, 2021, 4:10 p.m. OK MS C++ 2017 TESTS 15 31 3686400 800
129198889 utsavm A Sept. 18, 2021, 3:55 p.m. OK MS C++ 2017 TESTS 15 31 3686400 800
129196471 Tigran_Boyakhchyan A Sept. 18, 2021, 3:42 p.m. OK MS C++ 2017 TESTS 15 31 3686400 800
129190594 alex-1244 A Sept. 18, 2021, 3:18 p.m. OK .NET Core C# TESTS 15 109 12697600 800
129195415 Tom_Hanks A Sept. 18, 2021, 3:37 p.m. OK Node.js TESTS 15 187 14336000 800
129196251 ilgw19 A Sept. 18, 2021, 3:41 p.m. OK PHP TESTS 15 62 6041600 800
129208594 titia A Sept. 18, 2021, 5:36 p.m. OK PyPy 3 TESTS 15 124 23347200 800
129197053 Sangram_Jagadale A Sept. 18, 2021, 3:45 p.m. OK PyPy 3 TESTS 15 124 23449600 800
129208913 InvalidSyntax A Sept. 18, 2021, 5:40 p.m. OK PyPy 3 TESTS 15 139 23347200 800
129225534 ben_dover A Sept. 19, 2021, 1:36 a.m. OK PyPy 3 TESTS 15 140 22425600 800
129232741 Huntersoulz A Sept. 19, 2021, 5:06 a.m. OK PyPy 3 TESTS 15 155 23040000 800
129226336 thhsu A Sept. 19, 2021, 2:05 a.m. OK PyPy 3 TESTS 15 156 22937600 800
129229200 Melmetal A Sept. 19, 2021, 3:36 a.m. OK PyPy 3 TESTS 15 156 23142400 800
129193167 sohang A Sept. 18, 2021, 3:27 p.m. OK PyPy 3 TESTS 15 171 24064000 800
129218133 almaz_z A Sept. 18, 2021, 8:15 p.m. OK PyPy 3 TESTS 15 171 25702400 800
129227776 SmuggingSpon A Sept. 19, 2021, 2:52 a.m. OK PyPy 3 TESTS 15 171 25804800 800
129213919 Play_With_Mino A Sept. 18, 2021, 6:53 p.m. OK Python 3 TESTS 15 77 6758400 800
129221146 r57shell A Sept. 18, 2021, 9:40 p.m. OK Python 3 TESTS 15 77 6963200 800
129193611 Snehita_Amara A Sept. 18, 2021, 3:29 p.m. OK Python 3 TESTS 15 78 6963200 800
129226555 muethesim A Sept. 19, 2021, 2:12 a.m. OK Python 3 TESTS 15 93 6758400 800
129211871 GunT.HaDo A Sept. 18, 2021, 6:22 p.m. OK Python 3 TESTS 15 93 6758400 800
129197344 sivakanivan3 A Sept. 18, 2021, 3:47 p.m. OK Python 3 TESTS 15 93 6758400 800
129195650 aman_ravan02 A Sept. 18, 2021, 3:38 p.m. OK Python 3 TESTS 15 93 6758400 800
129192954 redhaired786 A Sept. 18, 2021, 3:26 p.m. OK Python 3 TESTS 15 93 6758400 800
129228451 eugalt A Sept. 19, 2021, 3:13 a.m. OK Python 3 TESTS 15 93 6963200 800
129205226 milind777 A Sept. 18, 2021, 4:26 p.m. OK Python 3 TESTS 15 93 6963200 800
129209129 SorKierkegaard A Sept. 18, 2021, 5:42 p.m. OK Rust TESTS 15 30 4096000 800
129230830 kobae964 A Sept. 19, 2021, 4:19 a.m. OK Rust TESTS 15 30 4300800 800
129217026 shadaj A Sept. 18, 2021, 7:49 p.m. OK Rust TESTS 15 31 3788800 800

remove filters

Back to search problems