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 |
---|---|---|---|---|---|---|
1536 | Codeforces Round 724 (Div. 2) | FINISHED | False | 7200 | 114189863 | June 6, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 20284 ) | A | Omkar and Bad Story | PROGRAMMING | brute force constructive algorithms | 800 |
B'Omkar has received a message from Anton saying "Your story for problem A is confusing. Just make a formal statement." Because of this, Omkar gives you an array a = [a_1, a_2, ldots, a_n] of n distinct integers. An array b = [b_1, b_2, ldots, b_k] is called nice if for any two distinct elements b_i, b_j of b , |b_i-b_j| appears in b at least once. In addition, all elements in b must be distinct. Can you add several (maybe, 0 ) integers to a to create a nice array b of size at most 300 ? If a is already nice, you don 't have to add any elements. For example, array [3, 6, 9] is nice, as |6-3|=|9-6| = 3 , which appears in the array, and |9-3| = 6 , which appears in the array, while array [4, 2, 0, 6, 9] is not nice, as |9-4| = 5 is not present in the array. For integers x and y , |x-y| = x-y if x > y and |x-y| = y-x otherwise. Each test contains multiple test cases. The first line contains t ( 1 <= q t <= q 50 ), the number of test cases. Description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= q n <= q 100 ) -- the length of the array a . The second line of each test case contains n distinct integers a_1, a_2, cdots, a_n ( -100 <= q a_i <= q 100 ) -- the elements of the array a . For each test case, output one line containing YES if Omkar can create a nice array b by adding elements to a and NO otherwise. The case of each letter does not matter, so yEs and nO will also be accepted. If the first line is YES, output a second line containing a single integer k ( n <= q k <= q 300 ). Then output one line containing k distinct integers b_1, b_2, cdots, b_k ( -10^9 <= q b_i <= q 10^9 ), the elements of the nice array b . b_1, b_2, cdots, b_k can be in any order. For each a_i in $$'... |
Codeforces Round #724 — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
118679551 | kxsk | A | June 7, 2021, 3:26 a.m. | OK | Clang++17 Diagnostics | TESTS | 33 | 77 | 0 | 800 | |
118666249 | ssvb | A | June 6, 2021, 7:35 p.m. | OK | D | TESTS | 33 | 77 | 6144000 | 800 | |
118675750 | Alric | A | June 7, 2021, 1:54 a.m. | OK | GNU C11 | TESTS | 33 | 31 | 0 | 800 | |
118654922 | Amelancholy | A | June 6, 2021, 5:19 p.m. | OK | GNU C11 | TESTS | 31 | 46 | 0 | 800 | |
118664919 | mardagio11 | A | June 6, 2021, 7:09 p.m. | OK | GNU C11 | TESTS | 33 | 46 | 0 | 800 | |
118668549 | 20bcs030 | A | June 6, 2021, 8:27 p.m. | OK | GNU C11 | TESTS | 33 | 46 | 0 | 800 | |
118651720 | iquoteonyou | A | June 6, 2021, 4:33 p.m. | OK | GNU C11 | TESTS | 31 | 46 | 0 | 800 | |
118657263 | vksai | A | June 6, 2021, 5:35 p.m. | OK | GNU C11 | TESTS | 31 | 46 | 0 | 800 | |
118647017 | harshita_gupta | A | June 6, 2021, 4:19 p.m. | OK | GNU C11 | TESTS | 31 | 61 | 0 | 800 | |
118680225 | ac_xiaofan | A | June 7, 2021, 3:41 a.m. | OK | GNU C++11 | TESTS | 33 | 30 | 0 | 800 | |
118687886 | Lucky_Yukikaze | A | June 7, 2021, 5:50 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 0 | 800 | |
118686800 | Oniket_Prantor | A | June 7, 2021, 5:34 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 0 | 800 | |
118686594 | qingyanng | A | June 7, 2021, 5:31 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 0 | 800 | |
118686462 | Arnavjain1703 | A | June 7, 2021, 5:29 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 0 | 800 | |
118686158 | hnust_lichengren | A | June 7, 2021, 5:24 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 0 | 800 | |
118685966 | SM01 | A | June 7, 2021, 5:22 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 0 | 800 | |
118685760 | zhangjunyan2580 | A | June 7, 2021, 5:19 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 0 | 800 | |
118688127 | Afjal_Sayed | A | June 7, 2021, 5:52 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 0 | 800 | |
118688116 | rhaken | A | June 7, 2021, 5:52 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 0 | 800 | |
118684015 | kushgandhi13 | A | June 7, 2021, 4:51 a.m. | OK | GNU C++14 | TESTS | 33 | 30 | 0 | 800 | |
118677041 | Zinn | A | June 7, 2021, 2:31 a.m. | OK | GNU C++14 | TESTS | 33 | 30 | 0 | 800 | |
118659056 | nitin111rajput | A | June 6, 2021, 5:53 p.m. | OK | GNU C++14 | TESTS | 31 | 30 | 0 | 800 | |
118666511 | aakash.shelake1999 | A | June 6, 2021, 7:40 p.m. | OK | GNU C++14 | TESTS | 33 | 30 | 102400 | 800 | |
118667391 | Vijay_07 | A | June 6, 2021, 8 p.m. | OK | GNU C++14 | TESTS | 33 | 30 | 204800 | 800 | |
118679870 | kundusuraj06 | A | June 7, 2021, 3:34 a.m. | OK | GNU C++14 | TESTS | 33 | 30 | 204800 | 800 | |
118688390 | Nick_7 | A | June 7, 2021, 5:56 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 0 | 800 | |
118688610 | NayraWeb | A | June 7, 2021, 5:58 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 0 | 800 | |
118688855 | hai_koi | A | June 7, 2021, 6:01 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 0 | 800 | |
118688339 | gntapprthn11 | A | June 7, 2021, 5:55 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 0 | 800 | |
118676333 | DC17 | A | June 7, 2021, 2:13 a.m. | OK | GNU C++17 | TESTS | 33 | 30 | 0 | 800 | |
118688005 | AnandprakashDK | A | June 7, 2021, 5:51 a.m. | OK | GNU C++17 | TESTS | 33 | 30 | 0 | 800 | |
118680888 | yatharthnigam | A | June 7, 2021, 3:55 a.m. | OK | GNU C++17 | TESTS | 33 | 30 | 0 | 800 | |
118678517 | Aref111n | A | June 7, 2021, 3:03 a.m. | OK | GNU C++17 | TESTS | 33 | 30 | 0 | 800 | |
118675248 | pr_ll | A | June 7, 2021, 1:37 a.m. | OK | GNU C++17 | TESTS | 33 | 30 | 0 | 800 | |
118662729 | prasun_roy | A | June 6, 2021, 6:33 p.m. | OK | GNU C++17 | TESTS | 32 | 30 | 0 | 800 | |
118661750 | captivator_12 | A | June 6, 2021, 6:20 p.m. | OK | GNU C++17 | TESTS | 32 | 30 | 0 | 800 | |
118658874 | nishantanindian | A | June 6, 2021, 5:51 p.m. | OK | GNU C++17 | TESTS | 31 | 30 | 0 | 800 | |
118646043 | bhanurocks | A | June 6, 2021, 4:16 p.m. | OK | GNU C++17 | TESTS | 31 | 30 | 102400 | 800 | |
118675515 | singh23saurav | A | June 7, 2021, 1:46 a.m. | OK | GNU C++17 | TESTS | 33 | 30 | 204800 | 800 | |
118660747 | cracyx | A | June 6, 2021, 6:12 p.m. | OK | GNU C++17 (64) | TESTS | 32 | 15 | 0 | 800 | |
118662889 | ajay_2908 | A | June 6, 2021, 6:35 p.m. | OK | GNU C++17 (64) | TESTS | 32 | 30 | 0 | 800 | |
118658374 | lemongrab | A | June 6, 2021, 5:46 p.m. | OK | GNU C++17 (64) | TESTS | 31 | 30 | 0 | 800 | |
118657766 | Harshil_ | A | June 6, 2021, 5:40 p.m. | OK | GNU C++17 (64) | TESTS | 31 | 30 | 0 | 800 | |
118674999 | uttammittal02 | A | June 7, 2021, 1:28 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 30 | 0 | 800 | |
118677836 | Prakhar6969 | A | June 7, 2021, 2:48 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 30 | 0 | 800 | |
118682450 | YoUkn0wh0 | A | June 7, 2021, 4:24 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 30 | 0 | 800 | |
118674334 | Coki628 | A | June 7, 2021, 12:59 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 30 | 0 | 800 | |
118673531 | pst10 | A | June 7, 2021, 12:17 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 30 | 0 | 800 | |
118665822 | llllllll | A | June 6, 2021, 7:26 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 30 | 0 | 800 | |
118670596 | frillo | A | June 6, 2021, 9:32 p.m. | OK | Haskell | TESTS | 33 | 31 | 102400 | 800 | |
118666333 | rolandorh | A | June 6, 2021, 7:36 p.m. | OK | Haskell | TESTS | 33 | 31 | 102400 | 800 | |
118649913 | vivala_haskell | A | June 6, 2021, 4:28 p.m. | OK | Haskell | TESTS | 31 | 46 | 102400 | 800 | |
118658993 | ypa | A | June 6, 2021, 5:52 p.m. | OK | Java 11 | TESTS | 31 | 187 | 0 | 800 | |
118684422 | Anuj_Panchal | A | June 7, 2021, 4:58 a.m. | OK | Java 11 | TESTS | 33 | 187 | 0 | 800 | |
118670780 | liu | A | June 6, 2021, 9:39 p.m. | OK | Java 11 | TESTS | 33 | 187 | 0 | 800 | |
118670752 | liu | A | June 6, 2021, 9:38 p.m. | OK | Java 11 | TESTS | 33 | 187 | 0 | 800 | |
118656958 | tsaraf | A | June 6, 2021, 5:32 p.m. | OK | Java 11 | TESTS | 31 | 187 | 0 | 800 | |
118655426 | vinam | A | June 6, 2021, 5:22 p.m. | OK | Java 11 | TESTS | 31 | 187 | 0 | 800 | |
118678339 | ekissoo | A | June 7, 2021, 2:59 a.m. | OK | Java 11 | TESTS | 33 | 202 | 0 | 800 | |
118685967 | markgeek | A | June 7, 2021, 5:22 a.m. | OK | Java 11 | TESTS | 33 | 202 | 0 | 800 | |
118685119 | akshatj07 | A | June 7, 2021, 5:09 a.m. | OK | Java 11 | TESTS | 33 | 202 | 0 | 800 | |
118672320 | Asgar | A | June 6, 2021, 10:58 p.m. | OK | Java 11 | TESTS | 33 | 202 | 0 | 800 | |
118659378 | PRIYANSH_TOMAR | A | June 6, 2021, 5:56 p.m. | OK | Java 8 | TESTS | 31 | 109 | 0 | 800 | |
118675087 | avneet_081 | A | June 7, 2021, 1:31 a.m. | OK | Java 8 | TESTS | 33 | 109 | 0 | 800 | |
118655450 | Adi_7861 | A | June 6, 2021, 5:22 p.m. | OK | Java 8 | TESTS | 31 | 109 | 0 | 800 | |
118655435 | Tanmay | A | June 6, 2021, 5:22 p.m. | OK | Java 8 | TESTS | 31 | 124 | 0 | 800 | |
118677003 | _robindhankhar | A | June 7, 2021, 2:30 a.m. | OK | Java 8 | TESTS | 33 | 124 | 0 | 800 | |
118676980 | _robindhankhar | A | June 7, 2021, 2:29 a.m. | OK | Java 8 | TESTS | 33 | 124 | 0 | 800 | |
118670012 | twoBit | A | June 6, 2021, 9:10 p.m. | OK | Java 8 | TESTS | 33 | 124 | 0 | 800 | |
118659482 | vparas | A | June 6, 2021, 5:57 p.m. | OK | Java 8 | TESTS | 31 | 124 | 0 | 800 | |
118658901 | RonWonWon | A | June 6, 2021, 5:51 p.m. | OK | Java 8 | TESTS | 31 | 124 | 0 | 800 | |
118654960 | Piyushnagpal80 | A | June 6, 2021, 5:19 p.m. | OK | Java 8 | TESTS | 31 | 124 | 0 | 800 | |
118670184 | Golovanov399 | A | June 6, 2021, 9:15 p.m. | OK | Kotlin | TESTS | 33 | 155 | 0 | 800 | |
118655687 | b2jena | A | June 6, 2021, 5:23 p.m. | OK | Kotlin | TESTS | 31 | 155 | 0 | 800 | |
118660019 | jisnu | A | June 6, 2021, 6:04 p.m. | OK | Kotlin | TESTS | 32 | 171 | 102400 | 800 | |
118659206 | ravi_prakash_28 | A | June 6, 2021, 5:54 p.m. | OK | MS C++ | TESTS | 31 | 31 | 0 | 800 | |
118674610 | XZmaria | A | June 7, 2021, 1:12 a.m. | OK | MS C++ 2017 | TESTS | 33 | 31 | 0 | 800 | |
118684411 | Shari | A | June 7, 2021, 4:57 a.m. | OK | MS C++ 2017 | TESTS | 33 | 31 | 0 | 800 | |
118655593 | sharmahimanshu65018 | A | June 6, 2021, 5:23 p.m. | OK | MS C++ 2017 | TESTS | 31 | 31 | 0 | 800 | |
118660816 | ankitbharti0210 | A | June 6, 2021, 6:13 p.m. | OK | MS C++ 2017 | TESTS | 32 | 46 | 0 | 800 | |
118681281 | ravina_b29 | A | June 7, 2021, 4:03 a.m. | OK | MS C++ 2017 | TESTS | 33 | 46 | 0 | 800 | |
118673984 | _Rimjhim_36 | A | June 7, 2021, 12:41 a.m. | OK | MS C++ 2017 | TESTS | 33 | 46 | 0 | 800 | |
118670984 | lhcalphaA | A | June 6, 2021, 9:47 p.m. | OK | MS C++ 2017 | TESTS | 33 | 46 | 0 | 800 | |
118662167 | mnrmustafa | A | June 6, 2021, 6:25 p.m. | OK | MS C++ 2017 | TESTS | 32 | 46 | 307200 | 800 | |
118662808 | f_cktorial | A | June 6, 2021, 6:34 p.m. | OK | MS C++ 2017 | TESTS | 32 | 62 | 0 | 800 | |
118681096 | markgeek | A | June 7, 2021, 3:59 a.m. | OK | .NET Core C# | TESTS | 33 | 124 | 614400 | 800 | |
118656419 | cs_tree | A | June 6, 2021, 5:28 p.m. | OK | PyPy 2 | TESTS | 31 | 124 | 409600 | 800 | |
118659044 | NaAm_ME_kYa_raKhA_hAi | A | June 6, 2021, 5:52 p.m. | OK | PyPy 2 | TESTS | 31 | 264 | 9216000 | 800 | |
118657148 | Mark_tven | A | June 6, 2021, 5:34 p.m. | OK | PyPy 3 | TESTS | 31 | 140 | 1740800 | 800 | |
118656733 | sathu.hebbar | A | June 6, 2021, 5:31 p.m. | OK | PyPy 3 | TESTS | 31 | 155 | 2662400 | 800 | |
118660327 | dubeygopal | A | June 6, 2021, 6:07 p.m. | OK | PyPy 3 | TESTS | 32 | 156 | 2764800 | 800 | |
118686168 | rummansadik | A | June 7, 2021, 5:24 a.m. | OK | PyPy 3 | TESTS | 33 | 170 | 2355200 | 800 | |
118658460 | sharmashubham1292000 | A | June 6, 2021, 5:47 p.m. | OK | PyPy 3 | TESTS | 31 | 170 | 2662400 | 800 | |
118669887 | surojit008 | A | June 6, 2021, 9:06 p.m. | OK | PyPy 3 | TESTS | 33 | 170 | 2867200 | 800 | |
118658806 | Eleven_eagles | A | June 6, 2021, 5:50 p.m. | OK | PyPy 3 | TESTS | 31 | 170 | 3891200 | 800 | |
118687509 | s_prateek26 | A | June 7, 2021, 5:45 a.m. | OK | PyPy 3 | TESTS | 33 | 171 | 2662400 | 800 | |
118660437 | iamsarvesh | A | June 6, 2021, 6:09 p.m. | OK | PyPy 3 | TESTS | 32 | 171 | 2662400 | 800 | |
118658410 | 1dL1nG | A | June 6, 2021, 5:46 p.m. | OK | PyPy 3 | TESTS | 31 | 171 | 2662400 | 800 | |
118657399 | Shanik | A | June 6, 2021, 5:36 p.m. | OK | Python 3 | TESTS | 31 | 108 | 0 | 800 | |
118685499 | SUK13 | A | June 7, 2021, 5:15 a.m. | OK | Python 3 | TESTS | 33 | 109 | 0 | 800 | |
118683497 | sh1194 | A | June 7, 2021, 4:42 a.m. | OK | Python 3 | TESTS | 33 | 109 | 0 | 800 | |
118679998 | hogrider | A | June 7, 2021, 3:36 a.m. | OK | Python 3 | TESTS | 33 | 109 | 0 | 800 | |
118679933 | hogrider | A | June 7, 2021, 3:35 a.m. | OK | Python 3 | TESTS | 33 | 109 | 0 | 800 | |
118674936 | Adityasingh_999 | A | June 7, 2021, 1:26 a.m. | OK | Python 3 | TESTS | 33 | 109 | 0 | 800 | |
118672260 | anubhabcodes | A | June 6, 2021, 10:54 p.m. | OK | Python 3 | TESTS | 33 | 109 | 0 | 800 | |
118663753 | akshaykumar200042 | A | June 6, 2021, 6:49 p.m. | OK | Python 3 | TESTS | 33 | 109 | 0 | 800 | |
118658628 | hsankhat099 | A | June 6, 2021, 5:48 p.m. | OK | Python 3 | TESTS | 31 | 109 | 0 | 800 | |
118658338 | shubham_409 | A | June 6, 2021, 5:45 p.m. | OK | Python 3 | TESTS | 31 | 109 | 0 | 800 | |
118663995 | pakshi_141199 | A | June 6, 2021, 6:53 p.m. | OK | Python 3 + libs | TESTS | 33 | 124 | 0 | 800 | |
118662018 | linhthi | A | June 6, 2021, 6:23 p.m. | OK | Python 3 + libs | TESTS | 32 | 124 | 0 | 800 | |
118667624 | tuna_salad | A | June 6, 2021, 8:05 p.m. | OK | Rust | TESTS | 33 | 46 | 0 | 800 | |
118658285 | IvanDyachenko | A | June 6, 2021, 5:45 p.m. | OK | Scala | TESTS | 31 | 499 | 0 | 800 |
Back to search problems