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 |
---|---|---|---|---|---|---|
1859 | Codeforces Round 892 (Div. 2) | FINISHED | False | 7200 | 39972299 | Aug. 12, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 33434 ) | A | United We Stand | PROGRAMMING | constructive algorithms graphs math |
B'Given an array a of length n , containing integers. And there are two initially empty arrays b and c . You need to add each element of array a to exactly one of the arrays b or c , in order to satisfy the following conditions: Output the arrays b and c that can be obtained, or output -1 if they do not exist. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 500 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= n <= 100 ) -- the length of array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- the elements of array a . For each test case, output a single integer -1 if a solution does not exist. Otherwise, in the first line, output two integers l_b and l_c -- the lengths of arrays b and c respectively. In the second line, output l_b integers b_1, b_2, ldots, b_{l_b} -- the elements of array b . In the third line, output l_c integers c_1, c_2, ldots, c_{l_c} -- the elements of array c . If there are multiple solutions, output any of them. You can output the elements of the arrays in any order. In the first test case, a solution does not exist. In the second test case, we can obtain b = [1, 3, 5] and c = [2, 4] . Then elements 2 and 4 do not divide elements 1, 3 and 5 . In the fifth test case, we can obtain b = [4, 8, 4] and c = [12, 12] . '... |
Video solutions from Geothermal. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
218599309 | IleksaNott | A | Aug. 12, 2023, 7:56 p.m. | OK | C# 10 | TESTS | 6 | 62 | 3788800 | ||
218624639 | Aiden121pearce | A | Aug. 13, 2023, 4:47 a.m. | OK | C# 10 | TESTS | 6 | 155 | 3379200 | ||
218588679 | rajn5181 | A | Aug. 12, 2023, 6:02 p.m. | OK | C# 10 | TESTS | 6 | 171 | 3379200 | ||
218618373 | Z-BanG | A | Aug. 13, 2023, 3 a.m. | OK | Clang++17 Diagnostics | TESTS | 6 | 373 | 6348800 | ||
218603706 | Suryanshsk_ofcl | A | Aug. 12, 2023, 9:02 p.m. | OK | Clang++20 Diagnostics | TESTS | 6 | 327 | 6348800 | ||
218589538 | 4702by | A | Aug. 12, 2023, 6:09 p.m. | OK | Clang++20 Diagnostics | TESTS | 6 | 358 | 6246400 | ||
218619296 | Zung04052000 | A | Aug. 13, 2023, 3:19 a.m. | OK | Clang++20 Diagnostics | TESTS | 6 | 374 | 3174400 | ||
218594338 | swayingdream | A | Aug. 12, 2023, 6:56 p.m. | OK | GNU C11 | TESTS | 6 | 31 | 0 | ||
218594749 | AbhiZx2004 | A | Aug. 12, 2023, 7:01 p.m. | OK | GNU C11 | TESTS | 6 | 186 | 0 | ||
218592386 | ArjoKar11_01 | A | Aug. 12, 2023, 6:34 p.m. | OK | GNU C11 | TESTS | 6 | 187 | 0 | ||
218606437 | dheeraj_0207 | A | Aug. 12, 2023, 9:55 p.m. | OK | GNU C11 | TESTS | 6 | 187 | 0 | ||
218581604 | harshit.x.singh | A | Aug. 12, 2023, 5:15 p.m. | OK | GNU C11 | TESTS | 6 | 187 | 819200 | ||
218572319 | Chetan12 | A | Aug. 12, 2023, 4:24 p.m. | OK | GNU C11 | TESTS | 6 | 202 | 0 | ||
218588284 | Jarviscoder | A | Aug. 12, 2023, 5:58 p.m. | OK | GNU C11 | TESTS | 6 | 202 | 0 | ||
218591432 | ArjoKar11_01 | A | Aug. 12, 2023, 6:25 p.m. | OK | GNU C11 | TESTS | 6 | 202 | 0 | ||
218592477 | MandaCR7 | A | Aug. 12, 2023, 6:35 p.m. | OK | GNU C11 | TESTS | 6 | 202 | 0 | ||
218620175 | zoncai45 | A | Aug. 13, 2023, 3:35 a.m. | OK | GNU C11 | TESTS | 6 | 202 | 102400 | ||
218617583 | jager59 | A | Aug. 13, 2023, 2:46 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
218611615 | atmduongdzz | A | Aug. 13, 2023, 12:26 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
218595835 | muhammadabrar | A | Aug. 12, 2023, 7:13 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
218585504 | ans2929 | A | Aug. 12, 2023, 5:38 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | ||
218591791 | deep4nshu | A | Aug. 12, 2023, 6:28 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 102400 | ||
218599403 | jrt_1899 | A | Aug. 12, 2023, 7:57 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 102400 | ||
218612343 | 18071500932 | A | Aug. 13, 2023, 12:49 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 102400 | ||
218593611 | Jae_ | A | Aug. 12, 2023, 6:47 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 204800 | ||
218608311 | menawali | A | Aug. 12, 2023, 10:39 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 204800 | ||
218585524 | wiza_rd | A | Aug. 12, 2023, 5:38 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 204800 | ||
218600883 | Manoooooon | A | Aug. 12, 2023, 8:18 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
218586292 | Vxrtesh | A | Aug. 12, 2023, 5:44 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
218584267 | Soumen_092002 | A | Aug. 12, 2023, 5:30 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
218581635 | bit_optimizer | A | Aug. 12, 2023, 5:16 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
218575545 | mmilon82814 | A | Aug. 12, 2023, 4:31 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
218587879 | tbzard | A | Aug. 12, 2023, 5:55 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
218625261 | SGColin | A | Aug. 13, 2023, 4:57 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
218620625 | kejunyu | A | Aug. 13, 2023, 3:43 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
218617822 | Mo5t | A | Aug. 13, 2023, 2:50 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | ||
218629039 | Shejuti_Binte_Feroz | A | Aug. 13, 2023, 5:48 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 102400 | ||
218602093 | tikoo1 | A | Aug. 12, 2023, 8:36 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218604906 | Fast_submit | A | Aug. 12, 2023, 9:23 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218606458 | yusiffff-ehabbbb | A | Aug. 12, 2023, 9:55 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218608624 | youssefmontaser | A | Aug. 12, 2023, 10:47 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218609447 | hhux | A | Aug. 12, 2023, 11:12 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218588215 | Cassifa | A | Aug. 12, 2023, 5:58 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218585330 | Mahmoud_Alaaraj | A | Aug. 12, 2023, 5:37 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218584666 | Sergey140146659 | A | Aug. 12, 2023, 5:32 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218576179 | ace055 | A | Aug. 12, 2023, 4:32 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218580014 | c221154 | A | Aug. 12, 2023, 5:09 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | ||
218614449 | IcealsoHeat | A | Aug. 13, 2023, 1:42 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 2048000 | ||
218626659 | Niket714 | A | Aug. 13, 2023, 5:17 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 0 | ||
218627063 | gzdxcodefish | A | Aug. 13, 2023, 5:22 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 0 | ||
218627217 | hubei_L | A | Aug. 13, 2023, 5:24 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 0 | ||
218627575 | Pratyu111 | A | Aug. 13, 2023, 5:29 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 0 | ||
218627834 | xiaoxiaobaozi | A | Aug. 13, 2023, 5:32 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 0 | ||
218628068 | Ambika_kumar | A | Aug. 13, 2023, 5:35 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 0 | ||
218628509 | RG2506 | A | Aug. 13, 2023, 5:41 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 0 | ||
218629158 | nnk03 | A | Aug. 13, 2023, 5:50 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 0 | ||
218629353 | secretman1312 | A | Aug. 13, 2023, 5:52 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 15 | 0 | ||
218614617 | Nanthakumar06 | A | Aug. 13, 2023, 1:45 a.m. | OK | Java 11 | TESTS | 6 | 202 | 0 | ||
218589269 | dzhi | A | Aug. 12, 2023, 6:07 p.m. | OK | Java 11 | TESTS | 6 | 202 | 0 | ||
218586991 | MayhemLemon | A | Aug. 12, 2023, 5:49 p.m. | OK | Java 11 | TESTS | 6 | 218 | 0 | ||
218580931 | Amir_Tarek | A | Aug. 12, 2023, 5:13 p.m. | OK | Java 11 | TESTS | 6 | 264 | 0 | ||
218593368 | duped321 | A | Aug. 12, 2023, 6:44 p.m. | OK | Java 11 | TESTS | 6 | 311 | 204800 | ||
218584800 | EmonKhan | A | Aug. 12, 2023, 5:33 p.m. | OK | Java 11 | TESTS | 6 | 404 | 0 | ||
218627856 | maverick_1729 | A | Aug. 13, 2023, 5:33 a.m. | OK | Java 11 | TESTS | 6 | 405 | 0 | ||
218592376 | PlayDate | A | Aug. 12, 2023, 6:34 p.m. | OK | Java 11 | TESTS | 6 | 421 | 0 | ||
218595969 | bhushan2311 | A | Aug. 12, 2023, 7:15 p.m. | OK | Java 11 | TESTS | 6 | 436 | 0 | ||
218584158 | mschact | A | Aug. 12, 2023, 5:29 p.m. | OK | Java 11 | TESTS | 6 | 436 | 0 | ||
218616371 | rdhakar246 | A | Aug. 13, 2023, 2:21 a.m. | OK | Java 17 | TESTS | 6 | 187 | 1638400 | ||
218586795 | blanks_no | A | Aug. 12, 2023, 5:48 p.m. | OK | Java 17 | TESTS | 6 | 202 | 307200 | ||
218572110 | flicktoss | A | Aug. 12, 2023, 4:24 p.m. | OK | Java 17 | TESTS | 6 | 233 | 512000 | ||
218614607 | Ligh0x74 | A | Aug. 13, 2023, 1:45 a.m. | OK | Java 17 | TESTS | 6 | 234 | 614400 | ||
218583785 | hiromi_ayase | A | Aug. 12, 2023, 5:27 p.m. | OK | Java 17 | TESTS | 6 | 248 | 716800 | ||
218584003 | AKhacks | A | Aug. 12, 2023, 5:28 p.m. | OK | Java 17 | TESTS | 6 | 249 | 716800 | ||
218626351 | zenitsu21 | A | Aug. 13, 2023, 5:13 a.m. | OK | Java 17 | TESTS | 6 | 264 | 45568000 | ||
218596573 | InfinitePath | A | Aug. 12, 2023, 7:22 p.m. | OK | Java 17 | TESTS | 6 | 280 | 41574400 | ||
218571538 | SAIRAJ_CHOWDHARY | A | Aug. 12, 2023, 4:22 p.m. | OK | Java 17 | TESTS | 6 | 295 | 1024000 | ||
218607774 | Talaat-Jr | A | Aug. 12, 2023, 10:24 p.m. | OK | Java 17 | TESTS | 6 | 296 | 1331200 | ||
218600865 | ManikantanV | A | Aug. 12, 2023, 8:18 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | ||
218620358 | Yousef_Badr | A | Aug. 13, 2023, 3:38 a.m. | OK | Java 8 | TESTS | 6 | 124 | 0 | ||
218592842 | ahmedTarek28 | A | Aug. 12, 2023, 6:39 p.m. | OK | Java 8 | TESTS | 6 | 124 | 0 | ||
218582325 | dhruvil8804 | A | Aug. 12, 2023, 5:19 p.m. | OK | Java 8 | TESTS | 6 | 124 | 0 | ||
218619479 | lpychemistry | A | Aug. 13, 2023, 3:22 a.m. | OK | Java 8 | TESTS | 6 | 171 | 0 | ||
218619315 | too_depressed | A | Aug. 13, 2023, 3:19 a.m. | OK | Java 8 | TESTS | 6 | 171 | 0 | ||
218584452 | Rippahh | A | Aug. 12, 2023, 5:31 p.m. | OK | Java 8 | TESTS | 6 | 264 | 0 | ||
218586636 | Harshit_3905 | A | Aug. 12, 2023, 5:46 p.m. | OK | Java 8 | TESTS | 6 | 265 | 0 | ||
218585998 | BishoEzzat | A | Aug. 12, 2023, 5:41 p.m. | OK | Java 8 | TESTS | 6 | 265 | 0 | ||
218592240 | Sumitsingh7 | A | Aug. 12, 2023, 6:33 p.m. | OK | Java 8 | TESTS | 6 | 280 | 6246400 | ||
218606351 | Dowtai | A | Aug. 12, 2023, 9:53 p.m. | OK | MS C++ 2017 | TESTS | 6 | 62 | 0 | ||
218611336 | 974437558 | A | Aug. 13, 2023, 12:16 a.m. | OK | MS C++ 2017 | TESTS | 6 | 62 | 3993600 | ||
218620933 | alex0511 | A | Aug. 13, 2023, 3:48 a.m. | OK | MS C++ 2017 | TESTS | 6 | 78 | 0 | ||
218619892 | exilesome | A | Aug. 13, 2023, 3:30 a.m. | OK | MS C++ 2017 | TESTS | 6 | 78 | 0 | ||
218610322 | BMW_CS_ | A | Aug. 12, 2023, 11:41 p.m. | OK | MS C++ 2017 | TESTS | 6 | 78 | 0 | ||
218594163 | madhuroshan | A | Aug. 12, 2023, 6:54 p.m. | OK | MS C++ 2017 | TESTS | 6 | 78 | 0 | ||
218593011 | ice-men | A | Aug. 12, 2023, 6:41 p.m. | OK | MS C++ 2017 | TESTS | 6 | 78 | 0 | ||
218613850 | Keval_78 | A | Aug. 13, 2023, 1:29 a.m. | OK | PyPy 3 | TESTS | 6 | 186 | 71987200 | ||
218622003 | Wooly18 | A | Aug. 13, 2023, 4:06 a.m. | OK | PyPy 3 | TESTS | 6 | 218 | 5836800 | ||
218620850 | nightHawk18 | A | Aug. 13, 2023, 3:47 a.m. | OK | PyPy 3 | TESTS | 6 | 233 | 8396800 | ||
218591973 | Bleeding_steel | A | Aug. 12, 2023, 6:30 p.m. | OK | PyPy 3 | TESTS | 6 | 233 | 9523200 | ||
218580133 | momenelmesady4803 | A | Aug. 12, 2023, 5:09 p.m. | OK | PyPy 3 | TESTS | 6 | 234 | 8294400 | ||
218620965 | Yeaish_Turj | A | Aug. 13, 2023, 3:49 a.m. | OK | PyPy 3 | TESTS | 6 | 280 | 9728000 | ||
218620923 | abbccd | A | Aug. 13, 2023, 3:48 a.m. | OK | PyPy 3 | TESTS | 6 | 280 | 9728000 | ||
218573065 | YangMing030308 | A | Aug. 12, 2023, 4:26 p.m. | OK | PyPy 3 | TESTS | 6 | 296 | 10137600 | ||
218616350 | drop_down | A | Aug. 13, 2023, 2:21 a.m. | OK | PyPy 3 | TESTS | 6 | 311 | 10035200 | ||
218592031 | mihkelmartin | A | Aug. 12, 2023, 6:30 p.m. | OK | PyPy 3-64 | TESTS | 6 | 77 | 5427200 | ||
218596049 | mohdaman892 | A | Aug. 12, 2023, 7:16 p.m. | OK | PyPy 3-64 | TESTS | 6 | 108 | 7475200 | ||
218622805 | dirac_de | A | Aug. 13, 2023, 4:20 a.m. | OK | PyPy 3-64 | TESTS | 6 | 109 | 9113600 | ||
218626192 | bothrajat | A | Aug. 13, 2023, 5:10 a.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 6246400 | ||
218581921 | oneku16 | A | Aug. 12, 2023, 5:17 p.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 6246400 | ||
218586642 | ankitesh | A | Aug. 12, 2023, 5:46 p.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 6656000 | ||
218595156 | hosniomar01 | A | Aug. 12, 2023, 7:06 p.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 7782400 | ||
218586160 | proguy20211510 | A | Aug. 12, 2023, 5:43 p.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 8192000 | ||
218583720 | MistaFlash | A | Aug. 12, 2023, 5:26 p.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 8704000 | ||
218629797 | PROELECTRO444 | A | Aug. 13, 2023, 5:58 a.m. | OK | PyPy 3-64 | TESTS | 6 | 124 | 9420800 | ||
218576696 | priyanshu183. | A | Aug. 12, 2023, 4:33 p.m. | OK | Python 3 | TESTS | 6 | 46 | 204800 | ||
218596484 | Hagoda | A | Aug. 12, 2023, 7:21 p.m. | OK | Python 3 | TESTS | 6 | 46 | 512000 | ||
218574959 | Pavann2324 | A | Aug. 12, 2023, 4:30 p.m. | OK | Python 3 | TESTS | 6 | 62 | 204800 | ||
218611203 | grapheo12 | A | Aug. 13, 2023, 12:12 a.m. | OK | Python 3 | TESTS | 6 | 62 | 409600 | ||
218571332 | klu_2100080127 | A | Aug. 12, 2023, 4:22 p.m. | OK | Python 3 | TESTS | 6 | 62 | 512000 | ||
218582852 | eugalt | A | Aug. 12, 2023, 5:21 p.m. | OK | Python 3 | TESTS | 6 | 62 | 921600 | ||
218596844 | sanjanapatel238 | A | Aug. 12, 2023, 7:25 p.m. | OK | Python 3 | TESTS | 6 | 77 | 512000 | ||
218575377 | mynameAGNIV | A | Aug. 12, 2023, 4:31 p.m. | OK | Python 3 | TESTS | 6 | 77 | 512000 | ||
218627072 | yeshwanth_216 | A | Aug. 13, 2023, 5:22 a.m. | OK | Python 3 | TESTS | 6 | 77 | 819200 | ||
218606108 | caio-felipee | A | Aug. 12, 2023, 9:48 p.m. | OK | Python 3 | TESTS | 6 | 78 | 512000 | ||
218603339 | 0x81 | A | Aug. 12, 2023, 8:55 p.m. | OK | Ruby 3 | TESTS | 6 | 280 | 1228800 | ||
218599938 | Hyrulia | A | Aug. 12, 2023, 8:04 p.m. | OK | Rust 2021 | TESTS | 6 | 15 | 1024000 | ||
218599899 | Andrew.Tweddle | A | Aug. 12, 2023, 8:04 p.m. | OK | Rust 2021 | TESTS | 6 | 31 | 102400 |
Back to search problems