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 |
---|---|---|---|---|---|---|
1110 | Codeforces Global Round 1 | FINISHED | False | 7200 | 182276699 | Feb. 7, 2019, 1:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3575 ) | D | Jongmah | PROGRAMMING | dp | 2200 |
B"You are playing a game of Jongmah. You don't need to know the rules to solve this problem. You have n tiles in your hand. Each tile has an integer between 1 and m written on it. To win the game, you will need to form some number of triples. Each triple consists of three tiles, such that the numbers written on the tiles are either all the same or consecutive. For example, 7, 7, 7 is a valid triple, and so is 12, 13, 14 , but 2,2,3 or 2,4,6 are not. You can only use the tiles in your hand to form triples. Each tile can be used in at most one triple. To determine how close you are to the win, you want to know the maximum number of triples you can form from the tiles in your hand. The first line contains two integers integer n and m ( 1 <= n, m <= 10^6 ) -- the number of tiles in your hand and the number of tiles types. The second line contains integers a_1, a_2, ldots, a_n ( 1 <= a_i <= m ), where a_i denotes the number written on the i -th tile. Print one integer: the maximum number of triples you can form. In the first example, we have tiles 2, 3, 3, 3, 4, 4, 4, 5, 5, 6 . We can form three triples in the following way: 2, 3, 4 ; 3, 4, 5 ; 4, 5, 6 . Since there are only 10 tiles, there is no way we could form 4 triples, so the answer is 3 . In the second example, we have tiles 1 , 2 , 3 ( 7 times), 4 , 5 ( 2 times). We can form 3 triples as follows: 1, 2, 3 ; 3, 3, 3 ; 3, 4, 5 . One can show that forming 4 triples is not possible. "... |
The Editorial of the First Codeforces Global Round |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
53306191 | vjudge3 | D | April 26, 2019, 3:18 a.m. | OK | Clang++17 Diagnostics | TESTS | 42 | 951 | 39526400 | 2200 | |
51021143 | ShiChenyang | D | March 8, 2019, 10:57 a.m. | OK | FPC | TESTS | 42 | 374 | 104550400 | 2200 | |
49650629 | luogu_bot2 | D | Feb. 9, 2019, 7:26 a.m. | OK | GNU C11 | TESTS | 42 | 202 | 41984000 | 2200 | |
49627132 | tiger0132 | D | Feb. 8, 2019, 12:33 p.m. | OK | GNU C11 | TESTS | 42 | 218 | 41984000 | 2200 | |
49586004 | Chipe1 | D | Feb. 7, 2019, 2:44 p.m. | OK | GNU C11 | TESTS | 42 | 233 | 120115200 | 2200 | |
54266271 | MYNAMEISSHARIFUL | D | May 17, 2019, 6:10 a.m. | OK | GNU C11 | TESTS | 42 | 296 | 120115200 | 2200 | |
52260389 | xgcxgc | D | April 3, 2019, 8:27 a.m. | OK | GNU C++11 | TESTS | 42 | 61 | 3993600 | 2200 | |
49610874 | FlashHu | D | Feb. 8, 2019, 12:21 a.m. | OK | GNU C++11 | TESTS | 42 | 61 | 4505600 | 2200 | |
49615455 | ustze | D | Feb. 8, 2019, 5:50 a.m. | OK | GNU C++11 | TESTS | 42 | 61 | 40038400 | 2200 | |
50352716 | _23333 | D | Feb. 23, 2019, 9:16 a.m. | OK | GNU C++11 | TESTS | 42 | 61 | 40140800 | 2200 | |
52559096 | caoyang1123 | D | April 10, 2019, 9:21 a.m. | OK | GNU C++11 | TESTS | 42 | 62 | 3993600 | 2200 | |
49610924 | FlashHu | D | Feb. 8, 2019, 12:27 a.m. | OK | GNU C++11 | TESTS | 42 | 62 | 4505600 | 2200 | |
58979323 | wangzhijian | D | Aug. 18, 2019, 3:15 a.m. | OK | GNU C++11 | TESTS | 42 | 62 | 40038400 | 2200 | |
50144528 | luogu_bot1 | D | Feb. 19, 2019, 2:35 a.m. | OK | GNU C++11 | TESTS | 42 | 77 | 3788800 | 2200 | |
58415952 | luogu_bot1 | D | Aug. 7, 2019, 4:57 a.m. | OK | GNU C++11 | TESTS | 42 | 77 | 39936000 | 2200 | |
52634345 | BestMSN | D | April 12, 2019, 9:04 a.m. | OK | GNU C++11 | TESTS | 42 | 77 | 39936000 | 2200 | |
49602016 | shaviava | D | Feb. 7, 2019, 5:32 p.m. | OK | GNU C++14 | TESTS | 42 | 62 | 3993600 | 2200 | |
49612459 | nickluo | D | Feb. 8, 2019, 3:01 a.m. | OK | GNU C++14 | TESTS | 42 | 77 | 40652800 | 2200 | |
49829365 | tokitsukaze | D | Feb. 12, 2019, 1:13 p.m. | OK | GNU C++14 | TESTS | 42 | 78 | 40140800 | 2200 | |
49601541 | shaviava | D | Feb. 7, 2019, 5:20 p.m. | OK | GNU C++14 | TESTS | 42 | 93 | 3993600 | 2200 | |
49601816 | shaviava | D | Feb. 7, 2019, 5:27 p.m. | OK | GNU C++14 | TESTS | 42 | 108 | 3993600 | 2200 | |
49612274 | interestingLSY | D | Feb. 8, 2019, 2:49 a.m. | OK | GNU C++14 | TESTS | 42 | 124 | 149094400 | 2200 | |
49612278 | HatsuneMikuo | D | Feb. 8, 2019, 2:49 a.m. | OK | GNU C++14 | TESTS | 42 | 124 | 149094400 | 2200 | |
52158334 | Newusers | D | April 1, 2019, 2:12 p.m. | OK | GNU C++14 | TESTS | 42 | 202 | 40038400 | 2200 | |
49647618 | tjd229 | D | Feb. 9, 2019, 5:46 a.m. | OK | GNU C++14 | TESTS | 42 | 202 | 40345600 | 2200 | |
49907528 | TheRedLegend | D | Feb. 14, 2019, 12:42 p.m. | OK | GNU C++14 | TESTS | 42 | 202 | 44134400 | 2200 | |
49601696 | Eran | D | Feb. 7, 2019, 5:24 p.m. | OK | GNU C++17 | TESTS | 42 | 61 | 4300800 | 2200 | |
49601249 | Eran | D | Feb. 7, 2019, 5:13 p.m. | OK | GNU C++17 | TESTS | 42 | 77 | 4300800 | 2200 | |
49627258 | KillerX | D | Feb. 8, 2019, 12:37 p.m. | OK | GNU C++17 | TESTS | 42 | 93 | 4505600 | 2200 | |
49658246 | sundaysea | D | Feb. 9, 2019, 11:05 a.m. | OK | GNU C++17 | TESTS | 42 | 217 | 40038400 | 2200 | |
49666552 | Excogitatoris | D | Feb. 9, 2019, 2:43 p.m. | OK | GNU C++17 | TESTS | 42 | 218 | 6246400 | 2200 | |
49644510 | mohamedeltair | D | Feb. 9, 2019, 2:52 a.m. | OK | GNU C++17 | TESTS | 42 | 233 | 64409600 | 2200 | |
49600075 | Benq | D | Feb. 7, 2019, 4:50 p.m. | OK | GNU C++17 | TESTS | 42 | 249 | 40345600 | 2200 | |
49619119 | libra8z | D | Feb. 8, 2019, 8:15 a.m. | OK | GNU C++17 | TESTS | 42 | 264 | 4300800 | 2200 | |
49589632 | henryrabbit | D | Feb. 7, 2019, 3 p.m. | OK | GNU C++17 | TESTS | 42 | 264 | 40345600 | 2200 | |
50151493 | Rafaaaaaaaaaaaam | D | Feb. 19, 2019, 7:40 a.m. | OK | GNU C++17 | TESTS | 42 | 264 | 64102400 | 2200 | |
64364891 | WangJialei | D | Nov. 6, 2019, 12:45 p.m. | OK | Go | TESTS | 42 | 826 | 23347200 | 2200 | |
64364947 | vjudge2 | D | Nov. 6, 2019, 12:46 p.m. | OK | Go | TESTS | 42 | 826 | 23347200 | 2200 | |
49601904 | gksato | D | Feb. 7, 2019, 5:29 p.m. | OK | Haskell | TESTS | 42 | 951 | 26419200 | 2200 | |
49595255 | icpc_loser | D | Feb. 7, 2019, 3:27 p.m. | OK | Java 8 | TESTS | 42 | 217 | 0 | 2200 | |
49606065 | bazinga84 | D | Feb. 7, 2019, 7:32 p.m. | OK | Java 8 | TESTS | 42 | 296 | 2457600 | 2200 | |
49609432 | wadissimo | D | Feb. 7, 2019, 10:06 p.m. | OK | Java 8 | TESTS | 42 | 343 | 37580800 | 2200 | |
49606986 | kusomushi | D | Feb. 7, 2019, 8:06 p.m. | OK | Java 8 | TESTS | 42 | 373 | 37376000 | 2200 | |
49619696 | Ziklon | D | Feb. 8, 2019, 8:38 a.m. | OK | Java 8 | TESTS | 42 | 389 | 2048000 | 2200 | |
49601156 | SecondThread | D | Feb. 7, 2019, 5:11 p.m. | OK | Java 8 | TESTS | 42 | 421 | 151040000 | 2200 | |
49604802 | spar5h | D | Feb. 7, 2019, 6:53 p.m. | OK | Java 8 | TESTS | 42 | 421 | 259174400 | 2200 | |
51439574 | happybelly | D | March 18, 2019, 9:02 a.m. | OK | Java 8 | TESTS | 42 | 452 | 0 | 2200 | |
51439893 | happybelly | D | March 18, 2019, 9:14 a.m. | OK | Java 8 | TESTS | 42 | 514 | 0 | 2200 | |
49588959 | hiro116s | D | Feb. 7, 2019, 2:57 p.m. | OK | Java 8 | TESTS | 42 | 545 | 126361600 | 2200 | |
50558079 | exs | D | Feb. 27, 2019, 9:13 a.m. | OK | Kotlin | TESTS | 42 | 685 | 34508800 | 2200 | |
49600019 | chokudai | D | Feb. 7, 2019, 4:49 p.m. | OK | Mono C# | TESTS | 42 | 592 | 88780800 | 2200 | |
49688592 | claw88 | D | Feb. 10, 2019, 9:42 a.m. | OK | Mono C# | TESTS | 42 | 841 | 111206400 | 2200 | |
52919797 | TrabajoNocturno | D | April 17, 2019, 5:19 p.m. | OK | Mono C# | TESTS | 42 | 1013 | 163328000 | 2200 | |
49658017 | selpo | D | Feb. 9, 2019, 10:58 a.m. | OK | Mono C# | TESTS | 42 | 1699 | 123289600 | 2200 | |
49657885 | selpo | D | Feb. 9, 2019, 10:55 a.m. | OK | Mono C# | TESTS | 42 | 1746 | 123289600 | 2200 | |
49947044 | vjudge2 | D | Feb. 15, 2019, 12:30 p.m. | OK | MS C++ | TESTS | 42 | 171 | 40140800 | 2200 | |
49947753 | vjudge3 | D | Feb. 15, 2019, 12:47 p.m. | OK | MS C++ | TESTS | 42 | 202 | 40038400 | 2200 | |
50690337 | vjudge2 | D | March 2, 2019, 3:23 p.m. | OK | MS C++ | TESTS | 42 | 202 | 40038400 | 2200 | |
58329787 | vjudge2 | D | Aug. 5, 2019, 8:59 a.m. | OK | MS C++ | TESTS | 42 | 202 | 40140800 | 2200 | |
53490743 | vjudge4 | D | April 29, 2019, 8:28 a.m. | OK | MS C++ | TESTS | 42 | 217 | 40038400 | 2200 | |
49947405 | vjudge1 | D | Feb. 15, 2019, 12:39 p.m. | OK | MS C++ | TESTS | 42 | 217 | 40140800 | 2200 | |
58320174 | vjudge4 | D | Aug. 5, 2019, 5:23 a.m. | OK | MS C++ | TESTS | 42 | 217 | 68096000 | 2200 | |
64107517 | tarattata1 | D | Nov. 2, 2019, 5:16 p.m. | OK | MS C++ | TESTS | 42 | 218 | 76185600 | 2200 | |
49947802 | vjudge4 | D | Feb. 15, 2019, 12:48 p.m. | OK | MS C++ | TESTS | 42 | 233 | 40140800 | 2200 | |
49970253 | vjudge1 | D | Feb. 16, 2019, 1:23 a.m. | OK | MS C++ | TESTS | 42 | 234 | 40140800 | 2200 | |
58346551 | vjudge1 | D | Aug. 5, 2019, 3:15 p.m. | OK | MS C++ 2017 | TESTS | 42 | 296 | 40038400 | 2200 | |
53805740 | petko_mitkov | D | May 6, 2019, 12:25 a.m. | OK | MS C++ 2017 | TESTS | 42 | 311 | 72089600 | 2200 | |
49907197 | tangbinjie | D | Feb. 14, 2019, 12:34 p.m. | OK | MS C++ 2017 | TESTS | 42 | 327 | 40038400 | 2200 | |
58323279 | vjudge1 | D | Aug. 5, 2019, 6:47 a.m. | OK | MS C++ 2017 | TESTS | 42 | 327 | 44134400 | 2200 | |
49625091 | dyxx | D | Feb. 8, 2019, 11:32 a.m. | OK | MS C++ 2017 | TESTS | 42 | 327 | 64102400 | 2200 | |
49592382 | Programmer007 | D | Feb. 7, 2019, 3:13 p.m. | OK | MS C++ 2017 | TESTS | 42 | 420 | 3993600 | 2200 | |
49918509 | DavitMarg | D | Feb. 14, 2019, 5:34 p.m. | OK | MS C++ 2017 | TESTS | 42 | 733 | 3993600 | 2200 | |
49629499 | pill | D | Feb. 8, 2019, 1:33 p.m. | OK | MS C++ 2017 | TESTS | 42 | 780 | 40038400 | 2200 | |
49625812 | Gladius_Smerch | D | Feb. 8, 2019, 11:55 a.m. | OK | MS C++ 2017 | TESTS | 42 | 842 | 3993600 | 2200 | |
60684460 | siwei | D | Sept. 16, 2019, 2:55 p.m. | OK | MS C++ 2017 | TESTS | 42 | 1248 | 3993600 | 2200 | |
49606127 | pajenegod | D | Feb. 7, 2019, 7:35 p.m. | OK | PyPy 2 | TESTS | 42 | 951 | 65945600 | 2200 | |
49843992 | gatsko | D | Feb. 12, 2019, 8:09 p.m. | OK | PyPy 2 | TESTS | 42 | 1325 | 216678400 | 2200 | |
49635455 | YESMAths | D | Feb. 8, 2019, 6:27 p.m. | OK | PyPy 2 | TESTS | 42 | 1481 | 216883200 | 2200 | |
49635400 | YESMAths | D | Feb. 8, 2019, 6:26 p.m. | OK | PyPy 2 | TESTS | 42 | 1543 | 216883200 | 2200 | |
49752839 | Regius | D | Feb. 11, 2019, 4:06 a.m. | OK | PyPy 3 | TESTS | 42 | 1279 | 79564800 | 2200 | |
49613596 | Bovniova | D | Feb. 8, 2019, 4:17 a.m. | OK | PyPy 3 | TESTS | 42 | 1341 | 80179200 | 2200 | |
66314081 | rosekc | D | Dec. 5, 2019, 12:27 p.m. | OK | PyPy 3 | TESTS | 42 | 1388 | 64000000 | 2200 | |
49614068 | Bovniova | D | Feb. 8, 2019, 4:41 a.m. | OK | PyPy 3 | TESTS | 42 | 1388 | 80179200 | 2200 | |
49613631 | Bovniova | D | Feb. 8, 2019, 4:19 a.m. | OK | PyPy 3 | TESTS | 42 | 1559 | 80076800 | 2200 | |
49613364 | Bovniova | D | Feb. 8, 2019, 4:01 a.m. | OK | PyPy 3 | TESTS | 42 | 2074 | 84582400 | 2200 | |
49951745 | yakamoto | D | Feb. 15, 2019, 2:18 p.m. | OK | Scala | TESTS | 42 | 2105 | 252211200 | 2200 |
Back to search problems