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 |
---|---|---|---|---|---|---|
1539 | Codeforces Round 727 (Div. 2) | FINISHED | False | 7200 | 107639699 | June 20, 2021, 10:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 23255 ) | C | Stable Groups | PROGRAMMING | greedy sortings | 1200 |
B"There are n students numerated from 1 to n . The level of the i -th student is a_i . You need to split the students into stable groups. A group of students is called stable, if in the sorted array of their levels no two neighboring elements differ by more than x . For example, if x = 4 , then the group with levels [1, 10, 8, 4, 4] is stable (because 4 - 1 <= x , 4 - 4 <= x , 8 - 4 <= x , 10 - 8 <= x ), while the group with levels [2, 10, 10, 7] is not stable ( 7 - 2 = 5 > x ). Apart from the n given students, teachers can invite at most k additional students with arbitrary levels (at teachers' choice). Find the minimum number of stable groups teachers can form from all students (including the newly invited). For example, if there are two students with levels 1 and 5 ; x = 2 ; and k ge 1 , then you can invite a new student with level 3 and put all the students in one stable group. The first line contains three integers n , k , x ( 1 <= n <= 200 ,000 , 0 <= k <= 10^{18} , 1 <= x <= 10^{18} ) -- the initial number of students, the number of students you can additionally invite, and the maximum allowed level difference. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^{18} ) -- the students levels. In the only line print a single integer: the minimum number of stable groups you can split the students into. In the first example you can invite two students with levels 2 and 11 . Then you can split the students into two stable groups: In the second example you are not allowed to invite new students, so you need 3 groups: "... |
tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
120130520 | ssvb | C | June 20, 2021, 1:35 p.m. | OK | D | TESTS | 61 | 187 | 18944000 | 1200 | |
120131591 | Mrgglock | C | June 20, 2021, 1:44 p.m. | OK | GNU C11 | TESTS | 61 | 156 | 3174400 | 1200 | |
120173850 | liang_cheng | C | June 21, 2021, 4:48 a.m. | OK | GNU C++11 | TESTS | 63 | 77 | 7372800 | 1200 | |
120173322 | yiwu | C | June 21, 2021, 4:38 a.m. | OK | GNU C++11 | TESTS | 63 | 78 | 3174400 | 1200 | |
120140309 | youngsystem | C | June 20, 2021, 3:02 p.m. | OK | GNU C++11 | TESTS | 62 | 78 | 3174400 | 1200 | |
120134042 | Arihara_Nanami | C | June 20, 2021, 2:05 p.m. | OK | GNU C++11 | TESTS | 61 | 78 | 3174400 | 1200 | |
120139876 | vjudge2 | C | June 20, 2021, 2:59 p.m. | OK | GNU C++11 | TESTS | 62 | 78 | 15360000 | 1200 | |
120141389 | yiq | C | June 20, 2021, 3:13 p.m. | OK | GNU C++11 | TESTS | 62 | 78 | 74137600 | 1200 | |
120133826 | Huan_YP2002 | C | June 20, 2021, 2:03 p.m. | OK | GNU C++11 | TESTS | 61 | 93 | 3174400 | 1200 | |
120127212 | explorerxx | C | June 20, 2021, 1:11 p.m. | OK | GNU C++11 | TESTS | 60 | 93 | 3174400 | 1200 | |
120137908 | NEUQJacker | C | June 20, 2021, 2:40 p.m. | OK | GNU C++11 | TESTS | 62 | 93 | 4710400 | 1200 | |
120129890 | wrzwrzwrz | C | June 20, 2021, 1:30 p.m. | OK | GNU C++11 | TESTS | 61 | 93 | 4812800 | 1200 | |
120178271 | Sarthakx19 | C | June 21, 2021, 5:58 a.m. | OK | GNU C++14 | TESTS | 63 | 124 | 3174400 | 1200 | |
120172503 | SurajitPore | C | June 21, 2021, 4:18 a.m. | OK | GNU C++14 | TESTS | 63 | 124 | 3174400 | 1200 | |
120169478 | Leonard | C | June 21, 2021, 3:02 a.m. | OK | GNU C++14 | TESTS | 63 | 124 | 3174400 | 1200 | |
120152582 | Mr_Knowbody | C | June 20, 2021, 5:35 p.m. | OK | GNU C++14 | TESTS | 62 | 124 | 3174400 | 1200 | |
120145968 | den_den_den | C | June 20, 2021, 3:58 p.m. | OK | GNU C++14 | TESTS | 62 | 124 | 3174400 | 1200 | |
120137844 | BruteForcee | C | June 20, 2021, 2:40 p.m. | OK | GNU C++14 | TESTS | 62 | 124 | 3174400 | 1200 | |
120128288 | mashiroyuki | C | June 20, 2021, 1:19 p.m. | OK | GNU C++14 | TESTS | 61 | 124 | 3174400 | 1200 | |
120127365 | hehe_bro | C | June 20, 2021, 1:12 p.m. | OK | GNU C++14 | TESTS | 60 | 124 | 3174400 | 1200 | |
120178410 | manavdhiman003 | C | June 21, 2021, 6 a.m. | OK | GNU C++14 | TESTS | 63 | 124 | 4812800 | 1200 | |
120177621 | hnegi12345 | C | June 21, 2021, 5:48 a.m. | OK | GNU C++14 | TESTS | 63 | 124 | 4812800 | 1200 | |
120131684 | CodeAnya | C | June 20, 2021, 1:45 p.m. | OK | GNU C++17 | TESTS | 61 | 109 | 3174400 | 1200 | |
120126497 | Kteam014srb | C | June 20, 2021, 1:08 p.m. | OK | GNU C++17 | TESTS | 60 | 109 | 4812800 | 1200 | |
120136639 | penguinhacker | C | June 20, 2021, 2:29 p.m. | OK | GNU C++17 | TESTS | 62 | 124 | 3174400 | 1200 | |
120177217 | singhanoop31 | C | June 21, 2021, 5:43 a.m. | OK | GNU C++17 | TESTS | 63 | 124 | 3174400 | 1200 | |
120168256 | 5ive9ine | C | June 21, 2021, 2:23 a.m. | OK | GNU C++17 | TESTS | 63 | 124 | 3174400 | 1200 | |
120168133 | liaoyu131 | C | June 21, 2021, 2:19 a.m. | OK | GNU C++17 | TESTS | 63 | 124 | 3174400 | 1200 | |
120165903 | dangtiendung1201 | C | June 21, 2021, 12:44 a.m. | OK | GNU C++17 | TESTS | 62 | 124 | 3174400 | 1200 | |
120127933 | mhgishere | C | June 20, 2021, 1:16 p.m. | OK | GNU C++17 | TESTS | 61 | 124 | 3174400 | 1200 | |
120178028 | Anish_Bashyal | C | June 21, 2021, 5:54 a.m. | OK | GNU C++17 | TESTS | 63 | 124 | 4812800 | 1200 | |
120177353 | singhcodes | C | June 21, 2021, 5:44 a.m. | OK | GNU C++17 | TESTS | 63 | 124 | 4812800 | 1200 | |
120165828 | _Backl1ght | C | June 21, 2021, 12:40 a.m. | OK | GNU C++17 (64) | TESTS | 62 | 46 | 9318400 | 1200 | |
120165131 | _Backl1ght | C | June 21, 2021, midnight | OK | GNU C++17 (64) | TESTS | 62 | 62 | 11366400 | 1200 | |
120132473 | ScarletS | C | June 20, 2021, 1:52 p.m. | OK | GNU C++17 (64) | TESTS | 61 | 78 | 3174400 | 1200 | |
120153058 | cryptic.ax | C | June 20, 2021, 5:42 p.m. | OK | GNU C++17 (64) | TESTS | 62 | 78 | 5836800 | 1200 | |
120142737 | pedrovictor48 | C | June 20, 2021, 3:26 p.m. | OK | GNU C++17 (64) | TESTS | 62 | 78 | 5836800 | 1200 | |
120131779 | border | C | June 20, 2021, 1:46 p.m. | OK | GNU C++17 (64) | TESTS | 61 | 78 | 5836800 | 1200 | |
120126505 | xhdtlsid2 | C | June 20, 2021, 1:08 p.m. | OK | GNU C++17 (64) | TESTS | 60 | 78 | 5836800 | 1200 | |
120131089 | riddle17 | C | June 20, 2021, 1:40 p.m. | OK | GNU C++17 (64) | TESTS | 61 | 78 | 20480000 | 1200 | |
120175657 | Svlad_Cjelli | C | June 21, 2021, 5:19 a.m. | OK | GNU C++17 (64) | TESTS | 63 | 92 | 5836800 | 1200 | |
120148605 | madaraloveshashirama | C | June 20, 2021, 4:33 p.m. | OK | GNU C++17 (64) | TESTS | 62 | 92 | 5836800 | 1200 | |
120134662 | i_will_be_less_than_blue | C | June 20, 2021, 2:11 p.m. | OK | Java 11 | TESTS | 61 | 311 | 1228800 | 1200 | |
120163869 | bluesky111 | C | June 20, 2021, 10:28 p.m. | OK | Java 11 | TESTS | 62 | 342 | 5222400 | 1200 | |
120129652 | sarthakmanna | C | June 20, 2021, 1:28 p.m. | OK | Java 11 | TESTS | 61 | 343 | 4300800 | 1200 | |
120125898 | Dukkha | C | June 20, 2021, 1:05 p.m. | OK | Java 11 | TESTS | 60 | 343 | 5632000 | 1200 | |
120132071 | tushar_patil | C | June 20, 2021, 1:48 p.m. | OK | Java 11 | TESTS | 61 | 358 | 3891200 | 1200 | |
120143464 | mrlucent | C | June 20, 2021, 3:33 p.m. | OK | Java 11 | TESTS | 62 | 358 | 4915200 | 1200 | |
120155610 | nagu-pm | C | June 20, 2021, 6:24 p.m. | OK | Java 11 | TESTS | 62 | 358 | 7065600 | 1200 | |
120140370 | nagabhushan | C | June 20, 2021, 3:03 p.m. | OK | Java 11 | TESTS | 62 | 373 | 3481600 | 1200 | |
120136925 | sohamdas301 | C | June 20, 2021, 2:31 p.m. | OK | Java 11 | TESTS | 62 | 389 | 5529600 | 1200 | |
120157110 | amireripmav786 | C | June 20, 2021, 6:53 p.m. | OK | Java 11 | TESTS | 62 | 389 | 5529600 | 1200 | |
120136849 | _Eyepatch | C | June 20, 2021, 2:31 p.m. | OK | Java 8 | TESTS | 62 | 218 | 14745600 | 1200 | |
120130587 | aditya_daredevil | C | June 20, 2021, 1:36 p.m. | OK | Java 8 | TESTS | 61 | 295 | 17510400 | 1200 | |
120162240 | RedEnums | C | June 20, 2021, 9:08 p.m. | OK | Java 8 | TESTS | 62 | 296 | 5120000 | 1200 | |
120162159 | RedEnums | C | June 20, 2021, 9:05 p.m. | OK | Java 8 | TESTS | 62 | 311 | 2252800 | 1200 | |
120127660 | fan_balae | C | June 20, 2021, 1:15 p.m. | OK | Java 8 | TESTS | 61 | 311 | 4505600 | 1200 | |
120172011 | InANutshell | C | June 21, 2021, 4:06 a.m. | OK | Java 8 | TESTS | 63 | 311 | 15872000 | 1200 | |
120126207 | 4mda4mda | C | June 20, 2021, 1:06 p.m. | OK | Java 8 | TESTS | 60 | 311 | 15974400 | 1200 | |
120127068 | milon34 | C | June 20, 2021, 1:10 p.m. | OK | Java 8 | TESTS | 60 | 326 | 15872000 | 1200 | |
120161442 | pdk.abhishek | C | June 20, 2021, 8:42 p.m. | OK | Java 8 | TESTS | 62 | 342 | 15769600 | 1200 | |
120170325 | trappy00_28 | C | June 21, 2021, 3:25 a.m. | OK | Java 8 | TESTS | 63 | 342 | 16588800 | 1200 | |
120169118 | guga451 | C | June 21, 2021, 2:52 a.m. | OK | Kotlin | TESTS | 63 | 358 | 17408000 | 1200 | |
120145336 | ryo_n | C | June 20, 2021, 3:52 p.m. | OK | Kotlin | TESTS | 62 | 545 | 27545600 | 1200 | |
120121919 | catcatcute | C | June 20, 2021, 12:03 p.m. | OK | Kotlin | TESTS | 60 | 545 | 27545600 | 1200 | |
120127339 | BIT | C | June 20, 2021, 1:12 p.m. | OK | Mono C# | TESTS | 60 | 249 | 47820800 | 1200 | |
120144596 | 202014620115 | C | June 20, 2021, 3:44 p.m. | OK | MS C++ | TESTS | 62 | 108 | 3174400 | 1200 | |
120144832 | 202014620115 | C | June 20, 2021, 3:47 p.m. | OK | MS C++ | TESTS | 62 | 108 | 3174400 | 1200 | |
120145138 | 202014620115 | C | June 20, 2021, 3:50 p.m. | OK | MS C++ | TESTS | 62 | 109 | 3174400 | 1200 | |
120143878 | 202014620115 | C | June 20, 2021, 3:37 p.m. | OK | MS C++ | TESTS | 62 | 124 | 3174400 | 1200 | |
120129780 | the-fly0618 | C | June 20, 2021, 1:29 p.m. | OK | MS C++ 2017 | TESTS | 61 | 124 | 3174400 | 1200 | |
120144371 | 202014620115 | C | June 20, 2021, 3:42 p.m. | OK | MS C++ 2017 | TESTS | 62 | 124 | 3276800 | 1200 | |
120152042 | xsc | C | June 20, 2021, 5:26 p.m. | OK | MS C++ 2017 | TESTS | 62 | 140 | 4915200 | 1200 | |
120135852 | adasanvin12345 | C | June 20, 2021, 2:21 p.m. | OK | MS C++ 2017 | TESTS | 61 | 311 | 4915200 | 1200 | |
120141332 | Blejac | C | June 20, 2021, 3:13 p.m. | OK | MS C++ 2017 | TESTS | 62 | 312 | 3276800 | 1200 | |
120141223 | changlin.fu | C | June 20, 2021, 3:12 p.m. | OK | MS C++ 2017 | TESTS | 62 | 312 | 4915200 | 1200 | |
120158820 | Ilyaiq300 | C | June 20, 2021, 7:32 p.m. | OK | MS C++ 2017 | TESTS | 62 | 342 | 4915200 | 1200 | |
120129726 | sakapon | C | June 20, 2021, 1:29 p.m. | OK | .NET Core C# | TESTS | 61 | 171 | 30822400 | 1200 | |
120127446 | Alexey | C | June 20, 2021, 1:13 p.m. | OK | Node.js | TESTS | 60 | 655 | 46796800 | 1200 | |
120169328 | ktthree | C | June 21, 2021, 2:58 a.m. | OK | PyPy 2 | TESTS | 63 | 888 | 36556800 | 1200 | |
120145742 | renjied | C | June 20, 2021, 3:56 p.m. | OK | PyPy 2 | TESTS | 62 | 919 | 31436800 | 1200 | |
120131449 | acorn11 | C | June 20, 2021, 1:43 p.m. | OK | PyPy 2 | TESTS | 61 | 935 | 32665600 | 1200 | |
120169350 | ktthree | C | June 21, 2021, 2:58 a.m. | OK | PyPy 2 | TESTS | 63 | 935 | 44646400 | 1200 | |
120165623 | conqueror_of_conqueror | C | June 21, 2021, 12:29 a.m. | OK | PyPy 2 | TESTS | 62 | 950 | 31846400 | 1200 | |
120161658 | lebron87 | C | June 20, 2021, 8:49 p.m. | OK | PyPy 2 | TESTS | 62 | 966 | 34816000 | 1200 | |
120161693 | lebron87 | C | June 20, 2021, 8:50 p.m. | OK | PyPy 2 | TESTS | 62 | 982 | 34508800 | 1200 | |
120137285 | snape_here | C | June 20, 2021, 2:34 p.m. | OK | PyPy 2 | TESTS | 62 | 982 | 47513600 | 1200 | |
120131235 | acorn11 | C | June 20, 2021, 1:41 p.m. | OK | PyPy 2 | TESTS | 61 | 998 | 32870400 | 1200 | |
120161775 | lebron87 | C | June 20, 2021, 8:53 p.m. | OK | PyPy 2 | TESTS | 62 | 998 | 34304000 | 1200 | |
120146941 | renjied | C | June 20, 2021, 4:10 p.m. | OK | PyPy 3 | TESTS | 62 | 623 | 30515200 | 1200 | |
120134673 | at_f | C | June 20, 2021, 2:11 p.m. | OK | PyPy 3 | TESTS | 61 | 623 | 54272000 | 1200 | |
120138937 | blackSnek | C | June 20, 2021, 2:50 p.m. | OK | PyPy 3 | TESTS | 62 | 654 | 54886400 | 1200 | |
120156990 | imnowhere | C | June 20, 2021, 6:50 p.m. | OK | PyPy 3 | TESTS | 62 | 857 | 33792000 | 1200 | |
120156222 | rohit_vishwas_ | C | June 20, 2021, 6:34 p.m. | OK | PyPy 3 | TESTS | 62 | 857 | 33894400 | 1200 | |
120131110 | tqa236 | C | June 20, 2021, 1:40 p.m. | OK | PyPy 3 | TESTS | 61 | 857 | 39936000 | 1200 | |
120158718 | FlakeLCR | C | June 20, 2021, 7:29 p.m. | OK | PyPy 3 | TESTS | 62 | 873 | 44134400 | 1200 | |
120175949 | hsh8086 | C | June 21, 2021, 5:24 a.m. | OK | PyPy 3 | TESTS | 63 | 904 | 43929600 | 1200 | |
120136995 | blackSnek | C | June 20, 2021, 2:32 p.m. | OK | PyPy 3 | TESTS | 62 | 919 | 39116800 | 1200 | |
120158819 | bravotango | C | June 20, 2021, 7:32 p.m. | OK | PyPy 3 | TESTS | 62 | 935 | 43929600 | 1200 | |
120131517 | acorn11 | C | June 20, 2021, 1:44 p.m. | OK | Python 2 | TESTS | 61 | 623 | 16281600 | 1200 | |
120165672 | conqueror_of_conqueror | C | June 21, 2021, 12:32 a.m. | OK | Python 2 | TESTS | 62 | 670 | 17305600 | 1200 | |
120158892 | bravotango | C | June 20, 2021, 7:33 p.m. | OK | Python 3 | TESTS | 62 | 405 | 22118400 | 1200 | |
120131552 | asdsasd | C | June 20, 2021, 1:44 p.m. | OK | Python 3 | TESTS | 61 | 420 | 19865600 | 1200 | |
120157841 | agarus | C | June 20, 2021, 7:08 p.m. | OK | Python 3 | TESTS | 62 | 451 | 19763200 | 1200 | |
120159100 | Airths | C | June 20, 2021, 7:38 p.m. | OK | Python 3 | TESTS | 62 | 452 | 19763200 | 1200 | |
120136532 | aayush_1607 | C | June 20, 2021, 2:28 p.m. | OK | Python 3 | TESTS | 61 | 452 | 22323200 | 1200 | |
120143801 | CrouD | C | June 20, 2021, 3:37 p.m. | OK | Python 3 | TESTS | 62 | 467 | 19865600 | 1200 | |
120157732 | subhajitdas | C | June 20, 2021, 7:06 p.m. | OK | Python 3 | TESTS | 62 | 467 | 20275200 | 1200 | |
120155482 | _aadiupadhyay_ | C | June 20, 2021, 6:21 p.m. | OK | Python 3 | TESTS | 62 | 467 | 20275200 | 1200 | |
120144889 | shiviDON | C | June 20, 2021, 3:47 p.m. | OK | Python 3 | TESTS | 62 | 483 | 19865600 | 1200 | |
120162460 | Aman--Verma | C | June 20, 2021, 9:17 p.m. | OK | Python 3 | TESTS | 62 | 483 | 20275200 | 1200 | |
120135978 | p00f | C | June 20, 2021, 2:22 p.m. | OK | Rust | TESTS | 61 | 93 | 11878400 | 1200 | |
120135435 | p00f | C | June 20, 2021, 2:17 p.m. | OK | Rust | TESTS | 61 | 93 | 11878400 | 1200 | |
120135168 | p00f | C | June 20, 2021, 2:15 p.m. | OK | Rust | TESTS | 61 | 93 | 11878400 | 1200 | |
120145306 | anula | C | June 20, 2021, 3:51 p.m. | OK | Rust | TESTS | 62 | 108 | 11878400 | 1200 | |
120134922 | p00f | C | June 20, 2021, 2:13 p.m. | OK | Rust | TESTS | 61 | 109 | 16588800 | 1200 | |
120148164 | cf_username23 | C | June 20, 2021, 4:27 p.m. | OK | Rust | TESTS | 62 | 140 | 12288000 | 1200 |
Back to search problems