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 |
---|---|---|---|---|---|---|
1851 | Codeforces Round 888 (Div. 3) | FINISHED | False | 8100 | 41527499 | July 25, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 23550 ) | C | Tiles Comeback | PROGRAMMING | greedy implementation |
B'Vlad remembered that he had a series of n tiles and a number k . The tiles were numbered from left to right, and the i -th tile had colour c_i . If you stand on the first tile and start jumping any number of tiles right, you can get a path of length p . The length of the path is the number of tiles you stood on. Vlad wants to see if it is possible to get a path of length p such that: For example, let n = 14 , k = 3 . The colours of the tiles are contained in the array c = [ color{red}{1}, color{violet}{2}, color{red}{1}, color{red}{1}, color{gray}{7}, color{orange}{5}, color{green}{3}, color{green}{3}, color{red}{1}, color{green}{3}, color{blue}{4}, color{blue}{4}, color{violet}{2}, color{blue}{4} ]. Then we can construct a path of length 6 consisting of 2 blocks: color{red}{c_1} rightarrow color{red}{c_3} rightarrow color{red}{c_4} rightarrow color{blue}{c_{11}} rightarrow color{blue}{c_{12}} rightarrow color{blue}{c_{14}} All tiles from the 1 -st block will have colour color{red}{ textbf{1}} , from the 2 -nd block will have colour color{blue}{ textbf{4}} . It is also possible to construct a path of length 9 in this example, in which all tiles from the 1 -st block will have colour color{red}{ textbf{1}} , from the 2 -nd block will have colour color{green}{ textbf{3}} , and from the 3 -rd block will have colour color{blue}{ textbf{4}} . The first line of input data contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n and k ( 1 <= k <= n <= 2 cdot 10^5 ) --the number of tiles in the series and the length of the block. The second line of each test case contains n integers c_1, c_2, c_3, ... , c_n ( 1 <= c_i <= n ) -- the colours o'... |
118667 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
215637439 | PLUTO_o | C | July 25, 2023, 6:49 p.m. | OK | Clang++17 Diagnostics | TESTS | 6 | 780 | 819200 | ||
215622830 | iffatul_anon | C | July 25, 2023, 5:01 p.m. | OK | GNU C11 | TESTS | 6 | 46 | 819200 | ||
215656502 | rakeshkpdr | C | July 26, 2023, 12:43 a.m. | OK | GNU C11 | TESTS | 6 | 61 | 819200 | ||
215670283 | AVIT | C | July 26, 2023, 3:50 a.m. | OK | GNU C11 | TESTS | 6 | 62 | 819200 | ||
215657106 | soumyadebs22 | C | July 26, 2023, 12:56 a.m. | OK | GNU C11 | TESTS | 6 | 858 | 3174400 | ||
215653728 | You__Know__Who__ | C | July 25, 2023, 11:24 p.m. | OK | GNU C++14 | TESTS | 6 | 31 | 819200 | ||
215657337 | wanyuan | C | July 26, 2023, 1:01 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 409600 | ||
215666982 | fengshengwei | C | July 26, 2023, 3:10 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 819200 | ||
215680284 | jatinxkirito | C | July 26, 2023, 5:57 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 819200 | ||
215679052 | msalahuddin267 | C | July 26, 2023, 5:43 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 819200 | ||
215676559 | Sherlocked_hzoi | C | July 26, 2023, 5:13 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 819200 | ||
215676435 | princewaustin | C | July 26, 2023, 5:12 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 819200 | ||
215674282 | Pratyogi_7 | C | July 26, 2023, 4:45 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 819200 | ||
215672765 | vipul_singh | C | July 26, 2023, 4:23 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 819200 | ||
215671820 | Abd_Mamun | C | July 26, 2023, 4:10 a.m. | OK | GNU C++14 | TESTS | 6 | 46 | 819200 | ||
215652149 | FatmaElkady | C | July 25, 2023, 10:39 p.m. | OK | GNU C++17 | TESTS | 6 | 31 | 819200 | ||
215649327 | Dowry | C | July 25, 2023, 9:34 p.m. | OK | GNU C++17 | TESTS | 6 | 31 | 819200 | ||
215638212 | t1400 | C | July 25, 2023, 6:58 p.m. | OK | GNU C++17 | TESTS | 6 | 31 | 819200 | ||
215622236 | expertaq | C | July 25, 2023, 4:58 p.m. | OK | GNU C++17 | TESTS | 6 | 31 | 819200 | ||
215656664 | ShahidulMiraj | C | July 26, 2023, 12:47 a.m. | OK | GNU C++17 | TESTS | 6 | 31 | 819200 | ||
215659812 | whaov | C | July 26, 2023, 1:39 a.m. | OK | GNU C++17 | TESTS | 6 | 31 | 819200 | ||
215672457 | youssof | C | July 26, 2023, 4:19 a.m. | OK | GNU C++17 | TESTS | 6 | 31 | 819200 | ||
215676751 | r-a-j | C | July 26, 2023, 5:16 a.m. | OK | GNU C++17 | TESTS | 6 | 31 | 819200 | ||
215669060 | sreaednhue | C | July 26, 2023, 3:35 a.m. | OK | GNU C++17 | TESTS | 6 | 31 | 1638400 | ||
215679240 | Hustler2464 | C | July 26, 2023, 5:46 a.m. | OK | GNU C++17 | TESTS | 6 | 46 | 819200 | ||
215629834 | xiaossr | C | July 25, 2023, 5:41 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 30 | 819200 | ||
215661261 | vjudge5 | C | July 26, 2023, 2 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 30 | 819200 | ||
215638938 | tanishk_07 | C | July 25, 2023, 7:07 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 30 | 819200 | ||
215645968 | idoproblems | C | July 25, 2023, 8:42 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 30 | 819200 | ||
215668536 | happymore | C | July 26, 2023, 3:29 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 30 | 819200 | ||
215638692 | MAGIC_PEACH | C | July 25, 2023, 7:04 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 30 | 1638400 | ||
215669949 | rakib2624 | C | July 26, 2023, 3:46 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 31 | 819200 | ||
215659499 | Ccii | C | July 26, 2023, 1:35 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 31 | 819200 | ||
215643350 | OmarW | C | July 25, 2023, 8:08 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 31 | 819200 | ||
215634597 | GabrielNeri | C | July 25, 2023, 6:20 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 31 | 819200 | ||
215667259 | jwjXin | C | July 26, 2023, 3:13 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215663289 | BLUEMOON233 | C | July 26, 2023, 2:27 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215660034 | Wxngs | C | July 26, 2023, 1:42 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215633481 | sadat00 | C | July 25, 2023, 6:11 p.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215630217 | SenseiYahya | C | July 25, 2023, 5:44 p.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215628579 | reikohiya_cf | C | July 25, 2023, 5:32 p.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215670586 | bandiaoz | C | July 26, 2023, 3:54 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215672438 | fa45b216 | C | July 26, 2023, 4:19 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215674019 | michyjz | C | July 26, 2023, 4:42 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215678099 | talha4t | C | July 26, 2023, 5:32 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 819200 | ||
215675167 | dark_rays | C | July 26, 2023, 4:56 a.m. | OK | Java 11 | TESTS | 6 | 202 | 0 | ||
215641160 | princeayush04 | C | July 25, 2023, 7:32 p.m. | OK | Java 11 | TESTS | 6 | 202 | 0 | ||
215629785 | Sylvester_ | C | July 25, 2023, 5:41 p.m. | OK | Java 11 | TESTS | 6 | 202 | 0 | ||
215626890 | Sylvester_ | C | July 25, 2023, 5:21 p.m. | OK | Java 11 | TESTS | 6 | 202 | 0 | ||
215671774 | InfinitePath | C | July 26, 2023, 4:09 a.m. | OK | Java 11 | TESTS | 6 | 202 | 40140800 | ||
215633760 | anonuser | C | July 25, 2023, 6:13 p.m. | OK | Java 11 | TESTS | 6 | 233 | 0 | ||
215622716 | Akhil_Chennupati | C | July 25, 2023, 5 p.m. | OK | Java 11 | TESTS | 6 | 233 | 7782400 | ||
215633858 | anonuser | C | July 25, 2023, 6:14 p.m. | OK | Java 11 | TESTS | 6 | 249 | 0 | ||
215621007 | believe18 | C | July 25, 2023, 4:54 p.m. | OK | Java 11 | TESTS | 6 | 249 | 0 | ||
215658044 | ttannishh | C | July 26, 2023, 1:13 a.m. | OK | Java 11 | TESTS | 6 | 249 | 7577600 | ||
215667487 | looklakshya | C | July 26, 2023, 3:16 a.m. | OK | Java 17 | TESTS | 6 | 155 | 512000 | ||
215629675 | imvivekthakur | C | July 25, 2023, 5:40 p.m. | OK | Java 17 | TESTS | 6 | 171 | 204800 | ||
215657264 | Hayssam | C | July 26, 2023, 1 a.m. | OK | Java 17 | TESTS | 6 | 187 | 307200 | ||
215653398 | inst | C | July 25, 2023, 11:13 p.m. | OK | Java 17 | TESTS | 6 | 187 | 819200 | ||
215658994 | HMETAO | C | July 26, 2023, 1:27 a.m. | OK | Java 17 | TESTS | 6 | 202 | 204800 | ||
215673013 | jiangqiao | C | July 26, 2023, 4:27 a.m. | OK | Java 17 | TESTS | 6 | 202 | 819200 | ||
215667838 | Asnkkzk | C | July 26, 2023, 3:20 a.m. | OK | Java 17 | TESTS | 6 | 218 | 5632000 | ||
215639596 | ADust | C | July 25, 2023, 7:14 p.m. | OK | Java 17 | TESTS | 6 | 234 | 1433600 | ||
215621263 | char321 | C | July 25, 2023, 4:55 p.m. | OK | Java 17 | TESTS | 6 | 234 | 9830400 | ||
215662027 | Kiwiegg | C | July 26, 2023, 2:11 a.m. | OK | Java 17 | TESTS | 6 | 265 | 102400 | ||
215643172 | NerfThis | C | July 25, 2023, 8:05 p.m. | OK | Java 8 | TESTS | 6 | 124 | 1945600 | ||
215638347 | Sumitsingh7 | C | July 25, 2023, 7 p.m. | OK | Java 8 | TESTS | 6 | 140 | 5836800 | ||
215639797 | Masalmah | C | July 25, 2023, 7:16 p.m. | OK | Java 8 | TESTS | 6 | 140 | 38195200 | ||
215631316 | 6thSense | C | July 25, 2023, 5:53 p.m. | OK | Java 8 | TESTS | 6 | 187 | 5427200 | ||
215630206 | nodemailer | C | July 25, 2023, 5:44 p.m. | OK | Java 8 | TESTS | 6 | 311 | 0 | ||
215628469 | ScoobyDoobyDo | C | July 25, 2023, 5:32 p.m. | OK | Java 8 | TESTS | 6 | 311 | 0 | ||
215660218 | lemma_Forever | C | July 26, 2023, 1:45 a.m. | OK | Java 8 | TESTS | 6 | 342 | 0 | ||
215656408 | lankimanchodu | C | July 26, 2023, 12:41 a.m. | OK | Java 8 | TESTS | 6 | 358 | 3379200 | ||
215666611 | time_x | C | July 26, 2023, 3:05 a.m. | OK | MS C++ 2017 | TESTS | 6 | 62 | 819200 | ||
215668362 | fanhuaxingyu | C | July 26, 2023, 3:26 a.m. | OK | MS C++ 2017 | TESTS | 6 | 140 | 819200 | ||
215638236 | maxK99 | C | July 25, 2023, 6:58 p.m. | OK | MS C++ 2017 | TESTS | 6 | 140 | 819200 | ||
215636539 | eogito | C | July 25, 2023, 6:39 p.m. | OK | MS C++ 2017 | TESTS | 6 | 140 | 819200 | ||
215661480 | rukawa0111 | C | July 26, 2023, 2:03 a.m. | OK | MS C++ 2017 | TESTS | 6 | 140 | 3174400 | ||
215666656 | abdo663 | C | July 26, 2023, 3:06 a.m. | OK | MS C++ 2017 | TESTS | 6 | 156 | 819200 | ||
215663970 | mxdwj | C | July 26, 2023, 2:35 a.m. | OK | MS C++ 2017 | TESTS | 6 | 156 | 819200 | ||
215661730 | ooomm | C | July 26, 2023, 2:07 a.m. | OK | MS C++ 2017 | TESTS | 6 | 156 | 3174400 | ||
215669466 | Nanase_ai | C | July 26, 2023, 3:40 a.m. | OK | MS C++ 2017 | TESTS | 6 | 217 | 819200 | ||
215620973 | iron_nicko | C | July 25, 2023, 4:54 p.m. | OK | PyPy 3 | TESTS | 6 | 124 | 15872000 | ||
215632450 | Sams1111 | C | July 25, 2023, 6:02 p.m. | OK | PyPy 3 | TESTS | 6 | 202 | 16179200 | ||
215632679 | adu_alt | C | July 25, 2023, 6:04 p.m. | OK | PyPy 3 | TESTS | 6 | 311 | 23859200 | ||
215646711 | WalrusRamen21 | C | July 25, 2023, 8:53 p.m. | OK | PyPy 3 | TESTS | 6 | 420 | 13619200 | ||
215654893 | Wizard_of_Orz | C | July 25, 2023, 11:59 p.m. | OK | PyPy 3 | TESTS | 6 | 436 | 18022400 | ||
215642921 | Compiler_10 | C | July 25, 2023, 8 p.m. | OK | PyPy 3 | TESTS | 6 | 483 | 13414400 | ||
215664052 | gardengnome | C | July 26, 2023, 2:36 a.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 20275200 | ||
215675520 | MistaFlash | C | July 26, 2023, 5:01 a.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 20889600 | ||
215633199 | pcm_op | C | July 25, 2023, 6:08 p.m. | OK | PyPy 3-64 | TESTS | 6 | 140 | 28262400 | ||
215677567 | lkm_codeforces | C | July 26, 2023, 5:25 a.m. | OK | PyPy 3-64 | TESTS | 6 | 140 | 28979200 | ||
215629737 | gardengnome | C | July 25, 2023, 5:41 p.m. | OK | PyPy 3-64 | TESTS | 6 | 155 | 20275200 | ||
215634404 | damya | C | July 25, 2023, 6:19 p.m. | OK | PyPy 3-64 | TESTS | 6 | 155 | 20889600 | ||
215663812 | aureg109 | C | July 26, 2023, 2:33 a.m. | OK | PyPy 3-64 | TESTS | 6 | 170 | 28569600 | ||
215640487 | injust | C | July 25, 2023, 7:24 p.m. | OK | PyPy 3-64 | TESTS | 6 | 171 | 30924800 | ||
215644503 | blanks_no | C | July 25, 2023, 8:22 p.m. | OK | PyPy 3-64 | TESTS | 6 | 171 | 36966400 | ||
215662610 | ZrjaK | C | July 26, 2023, 2:18 a.m. | OK | PyPy 3-64 | TESTS | 6 | 186 | 30412800 | ||
215627048 | swapnil.2003 | C | July 25, 2023, 5:22 p.m. | OK | Python 3 | TESTS | 6 | 108 | 27033600 | ||
215676036 | Md.Salam_Uddin | C | July 26, 2023, 5:07 a.m. | OK | Python 3 | TESTS | 6 | 109 | 27033600 | ||
215623298 | Kalia_laal | C | July 25, 2023, 5:03 p.m. | OK | Python 3 | TESTS | 6 | 109 | 27033600 | ||
215636406 | Mohamed_Nasr24 | C | July 25, 2023, 6:38 p.m. | OK | Python 3 | TESTS | 6 | 109 | 28876800 | ||
215629022 | rohanmitra2420 | C | July 25, 2023, 5:35 p.m. | OK | Python 3 | TESTS | 6 | 124 | 26521600 | ||
215669244 | FeehamSzYr | C | July 26, 2023, 3:38 a.m. | OK | Python 3 | TESTS | 6 | 124 | 27033600 | ||
215668692 | 11235813ps | C | July 26, 2023, 3:31 a.m. | OK | Python 3 | TESTS | 6 | 124 | 27033600 | ||
215661185 | NoLongerHuman | C | July 26, 2023, 1:59 a.m. | OK | Python 3 | TESTS | 6 | 124 | 27033600 | ||
215659211 | A.Sami | C | July 26, 2023, 1:31 a.m. | OK | Python 3 | TESTS | 6 | 124 | 27033600 | ||
215632653 | jatint_05 | C | July 25, 2023, 6:04 p.m. | OK | Python 3 | TESTS | 6 | 124 | 27033600 | ||
215632742 | 0x81 | C | July 25, 2023, 6:05 p.m. | OK | Ruby 3 | TESTS | 6 | 405 | 13209600 |
Back to search problems