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 |
---|---|---|---|---|---|---|
1704 | CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) | FINISHED | False | 9000 | 72546899 | July 31, 2022, 2:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 16137 ) | C | Virus | PROGRAMMING | greedy sortings |
B'There are n houses numbered from 1 to n on a circle. For each 1 <= q i <= q n - 1 , house i and house i + 1 are neighbours; additionally, house n and house 1 are also neighbours. Initially, m of these n houses are infected by a deadly virus. Each morning, Cirno can choose a house which is uninfected and protect the house from being infected permanently. Every day, the following things happen in order: Cirno wants to stop the virus from spreading. Find the minimum number of houses that will be infected in the end, if she optimally choose the houses to protect. Note that every day Cirno always chooses a house to protect before the virus spreads. Also, a protected house will not be infected forever. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. Description of test cases follows. The first line of each test case consists of two positive integers n, m ( 5 <= q n <= q 10^9 , 1 <= q m <= q min(n, 10^5) ) -- the number of houses on the circle, and the number of houses that are initially infected. The second line of each test case consists of m distinct positive integers a_1, a_2, cdots , a_m ( 1 <= q a_i <= q n ) -- the indices of the houses infected initially. It is guaranteed that the sum of m over all test cases does not exceed 10^5 . For each test case, output an integer on a separate line, which is the minimum number of infected houses in the end. In the first test case: At the start of the first day, house 3 , 6 , 8 are infected. Choose house 2 to protect. At the start of the second day, house 3 , 4 , 5 , 6 , 7 , 8 , 9 are infected. Choose house 10 to protect. At the start of the third day, no more houses are infected. In the second test case: At the start of the first day, house 2 , $'... |
CodeTON Round 2 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
166384591 | sergmel | C | July 31, 2022, 3:24 p.m. | OK | C# 8 | TESTS | 66 | 171 | 9625600 | ||
166384359 | eastnman | C | July 31, 2022, 3:23 p.m. | OK | FPC | TESTS | 66 | 78 | 3379200 | ||
166415295 | Gastan | C | July 31, 2022, 8:05 p.m. | OK | GNU C11 | TESTS | 67 | 62 | 819200 | ||
166391379 | chenly8128 | C | July 31, 2022, 3:52 p.m. | OK | GNU C11 | TESTS | 66 | 62 | 819200 | ||
166398497 | ichi_kd | C | July 31, 2022, 4:28 p.m. | OK | GNU C11 | TESTS | 66 | 62 | 1228800 | ||
166443758 | SP2003 | C | Aug. 1, 2022, 5:44 a.m. | OK | GNU C11 | TESTS | 67 | 77 | 819200 | ||
166435068 | xsdjg | C | Aug. 1, 2022, 3:16 a.m. | OK | GNU C++14 | TESTS | 67 | 31 | 921600 | ||
166385490 | cfdqwqdfc | C | July 31, 2022, 3:28 p.m. | OK | GNU C++14 | TESTS | 66 | 46 | 409600 | ||
166426378 | luciannguyen07 | C | Aug. 1, 2022, 12:56 a.m. | OK | GNU C++14 | TESTS | 67 | 46 | 819200 | ||
166424784 | happycrazzy | C | Aug. 1, 2022, 12:14 a.m. | OK | GNU C++14 | TESTS | 67 | 46 | 819200 | ||
166417031 | Wilbert1124 | C | July 31, 2022, 8:34 p.m. | OK | GNU C++14 | TESTS | 67 | 46 | 819200 | ||
166416142 | YOK | C | July 31, 2022, 8:19 p.m. | OK | GNU C++14 | TESTS | 67 | 46 | 819200 | ||
166431566 | wojiao | C | Aug. 1, 2022, 2:20 a.m. | OK | GNU C++14 | TESTS | 67 | 46 | 819200 | ||
166431509 | Gszpqfaaa | C | Aug. 1, 2022, 2:19 a.m. | OK | GNU C++14 | TESTS | 67 | 46 | 819200 | ||
166430231 | JoesSR | C | Aug. 1, 2022, 1:59 a.m. | OK | GNU C++14 | TESTS | 67 | 46 | 819200 | ||
166427313 | AkaiLemon | C | Aug. 1, 2022, 1:15 a.m. | OK | GNU C++14 | TESTS | 67 | 46 | 819200 | ||
166392376 | hydro-bot3 | C | July 31, 2022, 3:57 p.m. | OK | GNU C++17 | TESTS | 66 | 31 | 2048000 | ||
166396305 | LRL52 | C | July 31, 2022, 4:17 p.m. | OK | GNU C++17 | TESTS | 66 | 31 | 3686400 | ||
166432854 | praying_cqf | C | Aug. 1, 2022, 2:41 a.m. | OK | GNU C++17 | TESTS | 67 | 46 | 819200 | ||
166430191 | h.s | C | Aug. 1, 2022, 1:58 a.m. | OK | GNU C++17 | TESTS | 67 | 46 | 819200 | ||
166429782 | qbb | C | Aug. 1, 2022, 1:51 a.m. | OK | GNU C++17 | TESTS | 67 | 46 | 819200 | ||
166418632 | Apple_Method | C | July 31, 2022, 9:03 p.m. | OK | GNU C++17 | TESTS | 67 | 46 | 819200 | ||
166436107 | Sempr | C | Aug. 1, 2022, 3:33 a.m. | OK | GNU C++17 | TESTS | 67 | 46 | 819200 | ||
166436044 | UnEmperor | C | Aug. 1, 2022, 3:32 a.m. | OK | GNU C++17 | TESTS | 67 | 46 | 819200 | ||
166439268 | sakil_hello | C | Aug. 1, 2022, 4:28 a.m. | OK | GNU C++17 | TESTS | 67 | 46 | 819200 | ||
166442096 | onfire_02 | C | Aug. 1, 2022, 5:18 a.m. | OK | GNU C++17 | TESTS | 67 | 46 | 819200 | ||
166384840 | Muly | C | July 31, 2022, 3:25 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 31 | 1433600 | ||
166443704 | vljxjg | C | Aug. 1, 2022, 5:43 a.m. | OK | GNU C++17 (64) | TESTS | 67 | 31 | 1433600 | ||
166426704 | ZhouSai | C | Aug. 1, 2022, 1:03 a.m. | OK | GNU C++17 (64) | TESTS | 67 | 31 | 1638400 | ||
166389354 | panyanppyy | C | July 31, 2022, 3:43 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 31 | 2048000 | ||
166425153 | Eter.nal | C | Aug. 1, 2022, 12:24 a.m. | OK | GNU C++17 (64) | TESTS | 67 | 31 | 2969600 | ||
166392367 | Meteor_Z | C | July 31, 2022, 3:57 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 31 | 2969600 | ||
166416854 | KevinyWu | C | July 31, 2022, 8:31 p.m. | OK | GNU C++17 (64) | TESTS | 67 | 31 | 2969600 | ||
166396211 | Saleh_zarezade | C | July 31, 2022, 4:17 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 31 | 2969600 | ||
166395594 | prathamnagpure | C | July 31, 2022, 4:14 p.m. | OK | GNU C++17 (64) | TESTS | 66 | 31 | 2969600 | ||
166431660 | yxlxszx | C | Aug. 1, 2022, 2:22 a.m. | OK | GNU C++17 (64) | TESTS | 67 | 31 | 3174400 | ||
166409202 | rgnerdplayer | C | July 31, 2022, 6:43 p.m. | OK | GNU C++20 (64) | TESTS | 67 | 31 | 819200 | ||
166407014 | cotato | C | July 31, 2022, 6:22 p.m. | OK | GNU C++20 (64) | TESTS | 67 | 31 | 819200 | ||
166406676 | RAYL | C | July 31, 2022, 6:19 p.m. | OK | GNU C++20 (64) | TESTS | 67 | 31 | 819200 | ||
166399304 | wwnn1205 | C | July 31, 2022, 4:32 p.m. | OK | GNU C++20 (64) | TESTS | 66 | 31 | 819200 | ||
166397969 | 3WhoSubmarine | C | July 31, 2022, 4:25 p.m. | OK | GNU C++20 (64) | TESTS | 66 | 31 | 819200 | ||
166395435 | dedsgr | C | July 31, 2022, 4:13 p.m. | OK | GNU C++20 (64) | TESTS | 66 | 31 | 819200 | ||
166410873 | ishwarendra | C | July 31, 2022, 7:03 p.m. | OK | GNU C++20 (64) | TESTS | 67 | 31 | 819200 | ||
166423998 | JustJie | C | July 31, 2022, 11:47 p.m. | OK | GNU C++20 (64) | TESTS | 67 | 31 | 819200 | ||
166431833 | Wint_x19 | C | Aug. 1, 2022, 2:25 a.m. | OK | GNU C++20 (64) | TESTS | 67 | 31 | 819200 | ||
166435052 | A_king | C | Aug. 1, 2022, 3:16 a.m. | OK | GNU C++20 (64) | TESTS | 67 | 31 | 819200 | ||
166387852 | protogrammer | C | July 31, 2022, 3:37 p.m. | OK | Go | TESTS | 66 | 77 | 2252800 | ||
166391935 | Nogard_ | C | July 31, 2022, 3:55 p.m. | OK | Go | TESTS | 66 | 78 | 5324800 | ||
166394758 | koqo | C | July 31, 2022, 4:09 p.m. | OK | Go | TESTS | 66 | 124 | 4403200 | ||
166436786 | dagnaf | C | Aug. 1, 2022, 3:44 a.m. | OK | Go | TESTS | 67 | 124 | 4608000 | ||
166414453 | iamavalon | C | July 31, 2022, 7:52 p.m. | OK | Java 11 | TESTS | 67 | 187 | 0 | ||
166386436 | goudezhao | C | July 31, 2022, 3:31 p.m. | OK | Java 11 | TESTS | 66 | 218 | 0 | ||
166389986 | def_not_alt | C | July 31, 2022, 3:46 p.m. | OK | Java 11 | TESTS | 66 | 233 | 0 | ||
166387242 | himanshuharlalka | C | July 31, 2022, 3:35 p.m. | OK | Java 11 | TESTS | 66 | 233 | 0 | ||
166405842 | the_unseen | C | July 31, 2022, 6:14 p.m. | OK | Java 11 | TESTS | 67 | 234 | 0 | ||
166385813 | the_unseen_jr | C | July 31, 2022, 3:29 p.m. | OK | Java 11 | TESTS | 66 | 234 | 0 | ||
166435293 | __Serendipity | C | Aug. 1, 2022, 3:19 a.m. | OK | Java 11 | TESTS | 67 | 248 | 0 | ||
166436598 | GoldenShadow | C | Aug. 1, 2022, 3:40 a.m. | OK | Java 11 | TESTS | 67 | 249 | 0 | ||
166394646 | VicG | C | July 31, 2022, 4:08 p.m. | OK | Java 11 | TESTS | 66 | 249 | 0 | ||
166427949 | djrfrn | C | Aug. 1, 2022, 1:24 a.m. | OK | Java 11 | TESTS | 67 | 264 | 0 | ||
166386915 | sahilrathore03 | C | July 31, 2022, 3:33 p.m. | OK | Java 17 | TESTS | 66 | 249 | 614400 | ||
166423844 | Mamimi | C | July 31, 2022, 11:41 p.m. | OK | Java 17 | TESTS | 67 | 265 | 512000 | ||
166410090 | ItsZaki | C | July 31, 2022, 6:53 p.m. | OK | Java 17 | TESTS | 67 | 296 | 716800 | ||
166442216 | Srikanth1777 | C | Aug. 1, 2022, 5:20 a.m. | OK | Java 17 | TESTS | 67 | 296 | 819200 | ||
166442158 | Srikanth1777 | C | Aug. 1, 2022, 5:19 a.m. | OK | Java 17 | TESTS | 67 | 358 | 716800 | ||
166397115 | vkukretiwork | C | July 31, 2022, 4:21 p.m. | OK | Java 17 | TESTS | 66 | 436 | 716800 | ||
166387561 | luke.nguyen | C | July 31, 2022, 3:36 p.m. | OK | Java 17 | TESTS | 66 | 436 | 921600 | ||
166391427 | _arcade | C | July 31, 2022, 3:53 p.m. | OK | Java 17 | TESTS | 66 | 529 | 6041600 | ||
166415776 | T_PAVAN_NAGARAJU | C | July 31, 2022, 8:13 p.m. | OK | Java 8 | TESTS | 67 | 140 | 0 | ||
166391465 | AFouad204 | C | July 31, 2022, 3:53 p.m. | OK | Java 8 | TESTS | 66 | 140 | 0 | ||
166385353 | leonlian | C | July 31, 2022, 3:27 p.m. | OK | Java 8 | TESTS | 66 | 155 | 0 | ||
166411477 | VishuTomar | C | July 31, 2022, 7:10 p.m. | OK | Java 8 | TESTS | 67 | 171 | 0 | ||
166391563 | Violet_Ever_Garden | C | July 31, 2022, 3:53 p.m. | OK | Java 8 | TESTS | 66 | 171 | 0 | ||
166396763 | priyaroy3370 | C | July 31, 2022, 4:20 p.m. | OK | Java 8 | TESTS | 66 | 171 | 5939200 | ||
166405945 | Eslam_Ahmed | C | July 31, 2022, 6:14 p.m. | OK | Java 8 | TESTS | 67 | 186 | 0 | ||
166385964 | swarup_312 | C | July 31, 2022, 3:30 p.m. | OK | Java 8 | TESTS | 66 | 186 | 0 | ||
166405482 | Mustafa__ | C | July 31, 2022, 6:12 p.m. | OK | Java 8 | TESTS | 66 | 187 | 0 | ||
166384649 | kevinqaq | C | July 31, 2022, 3:25 p.m. | OK | Java 8 | TESTS | 66 | 187 | 0 | ||
166383356 | WildTan | C | July 31, 2022, 3:20 p.m. | OK | Kotlin 1.5 | TESTS | 66 | 561 | 8089600 | ||
166416369 | SlavaG | C | July 31, 2022, 8:23 p.m. | OK | Kotlin 1.6 | TESTS | 67 | 374 | 5120000 | ||
166417032 | vjgarcia | C | July 31, 2022, 8:34 p.m. | OK | Kotlin 1.6 | TESTS | 67 | 468 | 8396800 | ||
166391463 | LostTemple | C | July 31, 2022, 3:53 p.m. | OK | Mono C# | TESTS | 66 | 124 | 13516800 | ||
166388666 | hamed053 | C | July 31, 2022, 3:40 p.m. | OK | MS C++ 2017 | TESTS | 66 | 62 | 819200 | ||
166392960 | satheesh321 | C | July 31, 2022, 4 p.m. | OK | MS C++ 2017 | TESTS | 66 | 62 | 819200 | ||
166437650 | Fish_L | C | Aug. 1, 2022, 3:57 a.m. | OK | MS C++ 2017 | TESTS | 67 | 109 | 1843200 | ||
166391080 | KKastaneda | C | July 31, 2022, 3:51 p.m. | OK | MS C++ 2017 | TESTS | 66 | 109 | 1843200 | ||
166395883 | Ayushcoder | C | July 31, 2022, 4:15 p.m. | OK | MS C++ 2017 | TESTS | 66 | 109 | 3481600 | ||
166439683 | rttyuii | C | Aug. 1, 2022, 4:36 a.m. | OK | MS C++ 2017 | TESTS | 67 | 124 | 819200 | ||
166385822 | MrB0NAN | C | July 31, 2022, 3:29 p.m. | OK | MS C++ 2017 | TESTS | 66 | 124 | 1843200 | ||
166390318 | DikshantAvi | C | July 31, 2022, 3:48 p.m. | OK | MS C++ 2017 | TESTS | 66 | 124 | 3174400 | ||
166396602 | darkangelforever | C | July 31, 2022, 4:19 p.m. | OK | MS C++ 2017 | TESTS | 66 | 140 | 3174400 | ||
166420618 | k4Jl1Zp0pbl | C | July 31, 2022, 10:03 p.m. | OK | MS C++ 2017 | TESTS | 67 | 155 | 1638400 | ||
166405937 | 1_2_3_4_5_9 | C | July 31, 2022, 6:14 p.m. | OK | PyPy 2 | TESTS | 67 | 202 | 15667200 | ||
166435747 | YMSeah | C | Aug. 1, 2022, 3:26 a.m. | OK | PyPy 3 | TESTS | 67 | 170 | 11878400 | ||
166388787 | sushmanth.dampur8780 | C | July 31, 2022, 3:41 p.m. | OK | PyPy 3 | TESTS | 66 | 218 | 11571200 | ||
166438028 | kraanzu | C | Aug. 1, 2022, 4:03 a.m. | OK | PyPy 3 | TESTS | 67 | 233 | 77824000 | ||
166391729 | sami02jain | C | July 31, 2022, 3:54 p.m. | OK | PyPy 3 | TESTS | 66 | 234 | 11468800 | ||
166388097 | sksshivam007 | C | July 31, 2022, 3:38 p.m. | OK | PyPy 3 | TESTS | 66 | 249 | 14336000 | ||
166386132 | KeiTsukishima | C | July 31, 2022, 3:30 p.m. | OK | PyPy 3 | TESTS | 66 | 327 | 17612800 | ||
166388453 | quandum | C | July 31, 2022, 3:39 p.m. | OK | PyPy 3 | TESTS | 66 | 343 | 15564800 | ||
166398096 | riosshin24 | C | July 31, 2022, 4:26 p.m. | OK | PyPy 3 | TESTS | 66 | 436 | 11980800 | ||
166391338 | JYar | C | July 31, 2022, 3:52 p.m. | OK | PyPy 3 | TESTS | 66 | 529 | 10649600 | ||
166389056 | RAZE_TEAM | C | July 31, 2022, 3:42 p.m. | OK | PyPy 3 | TESTS | 66 | 545 | 12800000 | ||
166439075 | CRY_ | C | Aug. 1, 2022, 4:24 a.m. | OK | PyPy 3-64 | TESTS | 67 | 124 | 16179200 | ||
166444392 | only_noob | C | Aug. 1, 2022, 5:53 a.m. | OK | PyPy 3-64 | TESTS | 67 | 124 | 18944000 | ||
166444775 | poornaTheja | C | Aug. 1, 2022, 5:58 a.m. | OK | PyPy 3-64 | TESTS | 67 | 139 | 17920000 | ||
166388476 | james.maslen | C | July 31, 2022, 3:40 p.m. | OK | PyPy 3-64 | TESTS | 66 | 140 | 14028800 | ||
166411863 | zii.hrs | C | July 31, 2022, 7:15 p.m. | OK | PyPy 3-64 | TESTS | 67 | 155 | 18124800 | ||
166413126 | MistaAsh | C | July 31, 2022, 7:32 p.m. | OK | PyPy 3-64 | TESTS | 67 | 155 | 18227200 | ||
166429545 | Lanceloia | C | Aug. 1, 2022, 1:47 a.m. | OK | PyPy 3-64 | TESTS | 67 | 170 | 18227200 | ||
166383574 | SmartyNotchy | C | July 31, 2022, 3:21 p.m. | OK | PyPy 3-64 | TESTS | 66 | 171 | 16179200 | ||
166385369 | Black.Ninja | C | July 31, 2022, 3:27 p.m. | OK | PyPy 3-64 | TESTS | 66 | 171 | 16486400 | ||
166383751 | Yusif | C | July 31, 2022, 3:21 p.m. | OK | PyPy 3-64 | TESTS | 66 | 187 | 15155200 | ||
166407670 | amarbudhiraja | C | July 31, 2022, 6:27 p.m. | OK | Python 3 | TESTS | 67 | 171 | 8089600 | ||
166384873 | happywater | C | July 31, 2022, 3:25 p.m. | OK | Python 3 | TESTS | 66 | 187 | 8089600 | ||
166389857 | yujt123 | C | July 31, 2022, 3:46 p.m. | OK | Python 3 | TESTS | 66 | 202 | 7782400 | ||
166421510 | VioletVal | C | July 31, 2022, 10:23 p.m. | OK | Python 3 | TESTS | 67 | 202 | 8089600 | ||
166391517 | jairaj01012002 | C | July 31, 2022, 3:53 p.m. | OK | Python 3 | TESTS | 66 | 202 | 8089600 | ||
166388493 | IronMan_P0 | C | July 31, 2022, 3:40 p.m. | OK | Python 3 | TESTS | 66 | 202 | 8089600 | ||
166387733 | 1Demiurg | C | July 31, 2022, 3:37 p.m. | OK | Python 3 | TESTS | 66 | 202 | 8396800 | ||
166392101 | SJOKER | C | July 31, 2022, 3:56 p.m. | OK | Python 3 | TESTS | 66 | 217 | 8294400 | ||
166394812 | poonam | C | July 31, 2022, 4:09 p.m. | OK | Python 3 | TESTS | 66 | 217 | 8908800 | ||
166397049 | anvesh_saxena | C | July 31, 2022, 4:21 p.m. | OK | Python 3 | TESTS | 66 | 218 | 8089600 | ||
166396378 | 0npata | C | July 31, 2022, 4:18 p.m. | OK | Rust 2021 | TESTS | 66 | 31 | 2764800 | ||
166414217 | Thallium54 | C | July 31, 2022, 7:48 p.m. | OK | Rust 2021 | TESTS | 67 | 31 | 4198400 | ||
166408237 | luukaos | C | July 31, 2022, 6:32 p.m. | OK | Rust 2021 | TESTS | 67 | 93 | 4198400 | ||
166410461 | songtianyi | C | July 31, 2022, 6:58 p.m. | OK | Rust 2021 | TESTS | 67 | 124 | 4198400 |
Back to search problems