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 |
---|---|---|---|---|---|---|
1902 | Educational Codeforces Round 159 (Rated for Div. 2) | FINISHED | False | 7200 | 35565863 | Dec. 3, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 14359 ) | C | Insert and Equalize | PROGRAMMING | brute force constructive algorithms greedy math number theory |
B"You are given an integer array a_1, a_2, ... , a_n , all its elements are distinct. First, you are asked to insert one more integer a_{n+1} into this array. a_{n+1} should not be equal to any of a_1, a_2, ... , a_n . Then, you will have to make all elements of the array equal. At the start, you choose a positive integer x ( x > 0 ). In one operation, you add x to exactly one element of the array. Note that x is the same for all operations. What's the smallest number of operations it can take you to make all elements equal, after you choose a_{n+1} and x ? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The first line of each testcase contains a single integer n ( 1 <= n <= 2 cdot 10^5 ). The second line contains n integers a_1, a_2, ... , a_n ( -10^9 <= a_i <= 10^9 ). All a_i are distinct. The sum of n over all testcases doesn't exceed 2 cdot 10^5 . For each testcase, print a single integer -- the smallest number of operations it can take you to make all elements equal, after you choose integers a_{n+1} and x . In the first testcase, you can choose a_{n+1} = 4 , the array becomes [1, 2, 3, 4] . Then choose x = 1 and apply the operation 3 times to the first element, 2 times to the second element, 1 time to the third element and 0 times to the fourth element. In the second testcase, you can choose a_{n+1} = 13, x = 4 . In the third testcase, you can choose a_{n+1} = 9, x = 1 . Then apply the operation once to a_{n+1} . "... |
Educational Codeforces Round 159 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
235652206 | bluemegane | C | Dec. 4, 2023, 3:39 a.m. | OK | C# 8 | TESTS | 7 | 155 | 30822400 | ||
235619529 | sachin_3059 | C | Dec. 3, 2023, 6:18 p.m. | OK | Clang++17 Diagnostics | TESTS | 7 | 1887 | 30617600 | ||
235650582 | Whopxx | C | Dec. 4, 2023, 3:09 a.m. | OK | Clang++20 Diagnostics | TESTS | 7 | 1996 | 30515200 | ||
235601555 | rk001233 | C | Dec. 3, 2023, 4:30 p.m. | OK | GNU C11 | TESTS | 7 | 124 | 1638400 | ||
235608583 | NikhilSharma26 | C | Dec. 3, 2023, 4:59 p.m. | OK | GNU C++14 | TESTS | 7 | 78 | 1638400 | ||
235632382 | suraj_mateti | C | Dec. 3, 2023, 8:25 p.m. | OK | GNU C++14 | TESTS | 7 | 78 | 1638400 | ||
235600797 | Mokshits21 | C | Dec. 3, 2023, 4:29 p.m. | OK | GNU C++14 | TESTS | 7 | 78 | 2764800 | ||
235615153 | m.arush | C | Dec. 3, 2023, 5:42 p.m. | OK | GNU C++14 | TESTS | 7 | 78 | 3174400 | ||
235609927 | abhishek_0123 | C | Dec. 3, 2023, 5:06 p.m. | OK | GNU C++14 | TESTS | 7 | 78 | 3174400 | ||
235654588 | tmt3012 | C | Dec. 4, 2023, 4:21 a.m. | OK | GNU C++14 | TESTS | 7 | 78 | 3174400 | ||
235605521 | yassjd199 | C | Dec. 3, 2023, 4:44 p.m. | OK | GNU C++14 | TESTS | 7 | 78 | 7987200 | ||
235630126 | sachin_53 | C | Dec. 3, 2023, 7:56 p.m. | OK | GNU C++14 | TESTS | 7 | 92 | 1638400 | ||
235610739 | stunareeb_09 | C | Dec. 3, 2023, 5:11 p.m. | OK | GNU C++14 | TESTS | 7 | 92 | 6451200 | ||
235658854 | garvil28 | C | Dec. 4, 2023, 5:26 a.m. | OK | GNU C++14 | TESTS | 7 | 93 | 1638400 | ||
235627373 | karelispanagiotis | C | Dec. 3, 2023, 7:29 p.m. | OK | GNU C++17 | TESTS | 7 | 62 | 819200 | ||
235635562 | expertaq | C | Dec. 3, 2023, 9:14 p.m. | OK | GNU C++17 | TESTS | 7 | 62 | 1638400 | ||
235610006 | Ayush2272 | C | Dec. 3, 2023, 5:07 p.m. | OK | GNU C++17 | TESTS | 7 | 62 | 1638400 | ||
235608504 | 3itachi | C | Dec. 3, 2023, 4:58 p.m. | OK | GNU C++17 | TESTS | 7 | 62 | 1638400 | ||
235648184 | polaris... | C | Dec. 4, 2023, 2:23 a.m. | OK | GNU C++17 | TESTS | 7 | 62 | 1638400 | ||
235660547 | tnakao | C | Dec. 4, 2023, 5:48 a.m. | OK | GNU C++17 | TESTS | 7 | 62 | 2355200 | ||
235610159 | autoastt | C | Dec. 3, 2023, 5:08 p.m. | OK | GNU C++17 | TESTS | 7 | 77 | 819200 | ||
235608828 | Nomia | C | Dec. 3, 2023, 5 p.m. | OK | GNU C++17 | TESTS | 7 | 77 | 819200 | ||
235633034 | agarwal_vaibhav | C | Dec. 3, 2023, 8:33 p.m. | OK | GNU C++17 | TESTS | 7 | 77 | 819200 | ||
235657095 | Srivatsa19 | C | Dec. 4, 2023, 5:02 a.m. | OK | GNU C++17 | TESTS | 7 | 77 | 1638400 | ||
235642753 | AnosVoldigoad | C | Dec. 4, 2023, 12:30 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 819200 | ||
235618507 | chappy1 | C | Dec. 3, 2023, 6:09 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 1638400 | ||
235652043 | N_z__ | C | Dec. 4, 2023, 3:37 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 1740800 | ||
235640491 | hughnhugh | C | Dec. 3, 2023, 11:29 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 4812800 | ||
235650077 | Toxiccht | C | Dec. 4, 2023, 2:59 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 61 | 819200 | ||
235643577 | Doubino1 | C | Dec. 4, 2023, 12:50 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 61 | 1638400 | ||
235653857 | no_nickname087 | C | Dec. 4, 2023, 4:08 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 61 | 1638400 | ||
235637728 | enslaved | C | Dec. 3, 2023, 10:14 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 62 | 819200 | ||
235634990 | PC_E1052 | C | Dec. 3, 2023, 9:06 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 62 | 819200 | ||
235658288 | fs20091003 | C | Dec. 4, 2023, 5:18 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 62 | 1638400 | ||
235645195 | pkp245464 | C | Dec. 4, 2023, 1:26 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 1638400 | ||
235660016 | EzGG | C | Dec. 4, 2023, 5:41 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 4198400 | ||
235617412 | notyourbae | C | Dec. 3, 2023, 6 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 46 | 819200 | ||
235649822 | Zhussipali-Shai-023-25 | C | Dec. 4, 2023, 2:54 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 46 | 819200 | ||
235649264 | secretman1312 | C | Dec. 4, 2023, 2:43 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 46 | 819200 | ||
235646396 | ht4779925 | C | Dec. 4, 2023, 1:48 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 46 | 819200 | ||
235642788 | User_Carrot | C | Dec. 4, 2023, 12:31 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 46 | 819200 | ||
235614663 | Ysyy | C | Dec. 3, 2023, 5:38 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 46 | 819200 | ||
235612708 | kurwa | C | Dec. 3, 2023, 5:23 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 46 | 819200 | ||
235610803 | XingU7 | C | Dec. 3, 2023, 5:11 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 46 | 819200 | ||
235610833 | RetiredNanfeng | C | Dec. 3, 2023, 5:12 p.m. | OK | Go | TESTS | 7 | 155 | 13414400 | ||
235599274 | DOOMJUICE | C | Dec. 3, 2023, 4:26 p.m. | OK | Java 11 | TESTS | 7 | 311 | 14131200 | ||
235656336 | djrfrn | C | Dec. 4, 2023, 4:49 a.m. | OK | Java 11 | TESTS | 7 | 312 | 14233600 | ||
235599654 | _and_suffering | C | Dec. 3, 2023, 4:27 p.m. | OK | Java 11 | TESTS | 7 | 358 | 4403200 | ||
235655071 | ljjkr | C | Dec. 4, 2023, 4:29 a.m. | OK | Java 11 | TESTS | 7 | 390 | 31027200 | ||
235603801 | BrisS | C | Dec. 3, 2023, 4:34 p.m. | OK | Java 17 | TESTS | 7 | 217 | 307200 | ||
235620451 | tiger3768 | C | Dec. 3, 2023, 6:26 p.m. | OK | Java 17 | TESTS | 7 | 264 | 4812800 | ||
235599063 | kenkapo | C | Dec. 3, 2023, 4:26 p.m. | OK | Java 17 | TESTS | 7 | 280 | 3379200 | ||
235633905 | Nagendravarma | C | Dec. 3, 2023, 8:45 p.m. | OK | Java 17 | TESTS | 7 | 327 | 7680000 | ||
235605337 | dineshchandran311 | C | Dec. 3, 2023, 4:43 p.m. | OK | Java 17 | TESTS | 7 | 373 | 27136000 | ||
235618655 | TCchen | C | Dec. 3, 2023, 6:10 p.m. | OK | Java 17 | TESTS | 7 | 374 | 3481600 | ||
235658072 | Ashuraj_Herode | C | Dec. 4, 2023, 5:15 a.m. | OK | Java 17 | TESTS | 7 | 623 | 409600 | ||
235601886 | prac_123 | C | Dec. 3, 2023, 4:31 p.m. | OK | Java 17 | TESTS | 7 | 670 | 6860800 | ||
235610651 | Danth575 | C | Dec. 3, 2023, 5:10 p.m. | OK | Java 17 | TESTS | 7 | 701 | 15974400 | ||
235629618 | abhishekkumarsingh9585 | C | Dec. 3, 2023, 7:52 p.m. | OK | Java 21 | TESTS | 7 | 608 | 409600 | ||
235625321 | abhishekkumarsingh9585 | C | Dec. 3, 2023, 7:10 p.m. | OK | Java 21 | TESTS | 7 | 623 | 409600 | ||
235601367 | amitkumarpunia02082002 | C | Dec. 3, 2023, 4:30 p.m. | OK | Java 21 | TESTS | 7 | 919 | 14643200 | ||
235613761 | priyaroy3370 | C | Dec. 3, 2023, 5:31 p.m. | OK | Java 8 | TESTS | 7 | 155 | 0 | ||
235630405 | vatsal_04 | C | Dec. 3, 2023, 7:59 p.m. | OK | Java 8 | TESTS | 7 | 233 | 15462400 | ||
235648119 | American_Eagle | C | Dec. 4, 2023, 2:21 a.m. | OK | Java 8 | TESTS | 7 | 248 | 16486400 | ||
235642262 | mohamedhassan_c | C | Dec. 4, 2023, 12:18 a.m. | OK | Java 8 | TESTS | 7 | 248 | 36454400 | ||
235642411 | mohamedhassan_c | C | Dec. 4, 2023, 12:21 a.m. | OK | Java 8 | TESTS | 7 | 248 | 36556800 | ||
235606648 | This_is_Rish | C | Dec. 3, 2023, 4:48 p.m. | OK | Java 8 | TESTS | 7 | 373 | 27955200 | ||
235600287 | Akarsh2810 | C | Dec. 3, 2023, 4:28 p.m. | OK | Java 8 | TESTS | 7 | 405 | 12902400 | ||
235652904 | quanvh16 | C | Dec. 4, 2023, 3:53 a.m. | OK | Java 8 | TESTS | 7 | 452 | 0 | ||
235629151 | NerfThis | C | Dec. 3, 2023, 7:47 p.m. | OK | Java 8 | TESTS | 7 | 529 | 12902400 | ||
235654855 | myheadhurt | C | Dec. 4, 2023, 4:26 a.m. | OK | Java 8 | TESTS | 7 | 639 | 38707200 | ||
235615684 | brownfox2k6 | C | Dec. 3, 2023, 5:46 p.m. | OK | Kotlin 1.7 | TESTS | 7 | 1044 | 69734400 | ||
235615417 | anh_rua_bat | C | Dec. 3, 2023, 5:44 p.m. | OK | Kotlin 1.7 | TESTS | 7 | 1044 | 69734400 | ||
235606392 | Bobko | C | Dec. 3, 2023, 4:47 p.m. | OK | Kotlin 1.7 | TESTS | 7 | 1434 | 125235200 | ||
235630479 | devanshjain1712 | C | Dec. 3, 2023, 8 p.m. | OK | MS C++ 2017 | TESTS | 7 | 264 | 1638400 | ||
235606867 | serafima.khokhlova2000 | C | Dec. 3, 2023, 4:49 p.m. | OK | MS C++ 2017 | TESTS | 7 | 264 | 1638400 | ||
235658501 | chayan.surana3 | C | Dec. 4, 2023, 5:21 a.m. | OK | MS C++ 2017 | TESTS | 7 | 265 | 7270400 | ||
235617671 | maxK99 | C | Dec. 3, 2023, 6:02 p.m. | OK | MS C++ 2017 | TESTS | 7 | 280 | 8089600 | ||
235601058 | Darooha | C | Dec. 3, 2023, 4:29 p.m. | OK | OCaml | TESTS | 7 | 312 | 9523200 | ||
235640955 | aymane.moataz3 | C | Dec. 3, 2023, 11:43 p.m. | OK | PyPy 3 | TESTS | 7 | 233 | 16281600 | ||
235618739 | loumock | C | Dec. 3, 2023, 6:11 p.m. | OK | PyPy 3 | TESTS | 7 | 607 | 25600000 | ||
235626008 | ipip | C | Dec. 3, 2023, 7:16 p.m. | OK | PyPy 3 | TESTS | 7 | 701 | 20377600 | ||
235654079 | bunny_senpai | C | Dec. 4, 2023, 4:12 a.m. | OK | PyPy 3 | TESTS | 7 | 748 | 23654400 | ||
235615347 | MihaiK11 | C | Dec. 3, 2023, 5:44 p.m. | OK | PyPy 3 | TESTS | 7 | 1777 | 35123200 | ||
235608252 | ProCoder12 | C | Dec. 3, 2023, 4:57 p.m. | OK | PyPy 3-64 | TESTS | 7 | 171 | 28467200 | ||
235610994 | kakiku | C | Dec. 3, 2023, 5:13 p.m. | OK | PyPy 3-64 | TESTS | 7 | 186 | 28774400 | ||
235611232 | RobinFromTheHood | C | Dec. 3, 2023, 5:14 p.m. | OK | PyPy 3-64 | TESTS | 7 | 186 | 30208000 | ||
235644225 | Ayush___ | C | Dec. 4, 2023, 1:06 a.m. | OK | PyPy 3-64 | TESTS | 7 | 187 | 30822400 | ||
235610580 | kakiku | C | Dec. 3, 2023, 5:10 p.m. | OK | PyPy 3-64 | TESTS | 7 | 202 | 27033600 | ||
235645435 | arausch | C | Dec. 4, 2023, 1:31 a.m. | OK | PyPy 3-64 | TESTS | 7 | 202 | 30617600 | ||
235640207 | DP_FORMULA | C | Dec. 3, 2023, 11:22 p.m. | OK | PyPy 3-64 | TESTS | 7 | 202 | 33177600 | ||
235616941 | zouyu9631 | C | Dec. 3, 2023, 5:56 p.m. | OK | PyPy 3-64 | TESTS | 7 | 217 | 30617600 | ||
235656159 | Quick-One | C | Dec. 4, 2023, 4:47 a.m. | OK | PyPy 3-64 | TESTS | 7 | 217 | 35840000 | ||
235613031 | kakiku | C | Dec. 3, 2023, 5:26 p.m. | OK | PyPy 3-64 | TESTS | 7 | 218 | 28774400 | ||
235615165 | anh_rua_bat | C | Dec. 3, 2023, 5:42 p.m. | OK | Python 3 | TESTS | 7 | 249 | 26828800 | ||
235598961 | Vaibhav_Gupta_22 | C | Dec. 3, 2023, 4:25 p.m. | OK | Python 3 | TESTS | 7 | 311 | 27443200 | ||
235611688 | Stolik | C | Dec. 3, 2023, 5:17 p.m. | OK | Python 3 | TESTS | 7 | 326 | 27340800 | ||
235605946 | Thundervolt | C | Dec. 3, 2023, 4:45 p.m. | OK | Python 3 | TESTS | 7 | 327 | 28672000 | ||
235599765 | vanshnawander | C | Dec. 3, 2023, 4:27 p.m. | OK | Python 3 | TESTS | 7 | 327 | 29696000 | ||
235632580 | 0x81 | C | Dec. 3, 2023, 8:28 p.m. | OK | Ruby 3 | TESTS | 7 | 764 | 51712000 | ||
235601274 | gr8den | C | Dec. 3, 2023, 4:30 p.m. | OK | Rust 2021 | TESTS | 7 | 46 | 23552000 | ||
235605195 | Gaomez | C | Dec. 3, 2023, 4:43 p.m. | OK | Rust 2021 | TESTS | 7 | 155 | 6246400 |
Back to search problems