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 |
---|---|---|---|---|---|---|
1264 | Codeforces Round 604 (Div. 1) | FINISHED | False | 7200 | 156266699 | Dec. 5, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 5828 ) | B | Beautiful Sequence | PROGRAMMING | brute force constructive algorithms greedy | 1900 |
B'An integer sequence is called beautiful if the difference between any two consecutive numbers is equal to 1 . More formally, a sequence s_1, s_2, ldots, s_{n} is beautiful if |s_i - s_{i+1}| = 1 for all 1 <= q i <= q n - 1 . Trans has a numbers 0 , b numbers 1 , c numbers 2 and d numbers 3 . He wants to construct a beautiful sequence using all of these a + b + c + d numbers. However, it turns out to be a non-trivial task, and Trans was not able to do it. Could you please help Trans? The only input line contains four non-negative integers a , b , c and d ( 0 < a+b+c+d <= q 10^5 ). If it is impossible to construct a beautiful sequence satisfying the above constraints, print "NO" (without quotes) in one line. Otherwise, print "YES" (without quotes) in the first line. Then in the second line print a + b + c + d integers, separated by spaces -- a beautiful sequence. There should be a numbers equal to 0 , b numbers equal to 1 , c numbers equal to 2 and d numbers equal to 3 . If there are multiple answers, you can print any of them. In the first test, it is easy to see, that the sequence is beautiful because the difference between any two consecutive numbers is equal to 1 . Also, there are exactly two numbers, equal to 0 , 1 , 2 and exactly one number, equal to 3 . It can be proved, that it is impossible to construct beautiful sequences in the second and third tests. '... |
71995 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
66330426 | iica | B | Dec. 5, 2019, 2:59 p.m. | OK | D | TESTS | 149 | 46 | 11878400 | 1900 | |
66341090 | hos.lyric | B | Dec. 5, 2019, 3:31 p.m. | OK | D | TESTS | 149 | 62 | 4300800 | 1900 | |
67409043 | B_live_it | B | Dec. 22, 2019, 7:36 a.m. | OK | GNU C11 | TESTS | 150 | 327 | 409600 | 1900 | |
66792392 | yakushovaa0202 | B | Dec. 13, 2019, 3:45 p.m. | OK | GNU C11 | TESTS | 150 | 327 | 409600 | 1900 | |
68201236 | mohana-256 | B | Jan. 4, 2020, 3:55 p.m. | OK | GNU C11 | TESTS | 150 | 327 | 409600 | 1900 | |
66599055 | satya_chaitanya | B | Dec. 10, 2019, 3:49 p.m. | OK | GNU C11 | TESTS | 150 | 342 | 80179200 | 1900 | |
66339787 | physics0523 | B | Dec. 5, 2019, 3:27 p.m. | OK | GNU C11 | TESTS | 149 | 639 | 2150400 | 1900 | |
66634792 | HANGANG | B | Dec. 11, 2019, 12:31 p.m. | OK | GNU C++11 | TESTS | 150 | 31 | 0 | 1900 | |
66535612 | NIT-allin | B | Dec. 9, 2019, 9:29 a.m. | OK | GNU C++11 | TESTS | 150 | 31 | 0 | 1900 | |
66375352 | Nice_to_meet_you | B | Dec. 6, 2019, 2:21 a.m. | OK | GNU C++11 | TESTS | 150 | 31 | 0 | 1900 | |
66362349 | zxozxo4 | B | Dec. 5, 2019, 6:19 p.m. | OK | GNU C++11 | TESTS | 149 | 31 | 0 | 1900 | |
66480730 | luogu_bot2 | B | Dec. 8, 2019, 2:12 a.m. | OK | GNU C++11 | TESTS | 150 | 31 | 0 | 1900 | |
67779735 | geneanlyz | B | Dec. 28, 2019, 10:29 a.m. | OK | GNU C++11 | TESTS | 150 | 31 | 0 | 1900 | |
67629341 | TrivialMan | B | Dec. 26, 2019, 2:10 a.m. | OK | GNU C++11 | TESTS | 150 | 31 | 0 | 1900 | |
66459576 | luogu_bot2 | B | Dec. 7, 2019, 2:20 p.m. | OK | GNU C++11 | TESTS | 150 | 31 | 0 | 1900 | |
66430609 | BEAR0131 | B | Dec. 7, 2019, 2:32 a.m. | OK | GNU C++11 | TESTS | 150 | 31 | 0 | 1900 | |
67149201 | 2020upOrange | B | Dec. 18, 2019, 10:05 a.m. | OK | GNU C++11 | TESTS | 150 | 31 | 0 | 1900 | |
66499055 | Twill | B | Dec. 8, 2019, 11:45 a.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
67047791 | cuom1999 | B | Dec. 17, 2019, 12:49 a.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
66818192 | SaiCharith | B | Dec. 14, 2019, 6:33 a.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
66746805 | leomao | B | Dec. 13, 2019, 3:09 a.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
66698921 | hjc20032003 | B | Dec. 12, 2019, 2:19 p.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
66456976 | bdzxt | B | Dec. 7, 2019, 1:29 p.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
66433378 | atharva_sarage | B | Dec. 7, 2019, 4:47 a.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
66404001 | AkJn | B | Dec. 6, 2019, 1:09 p.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
66394715 | Adarsh_kc | B | Dec. 6, 2019, 10:22 a.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
66392644 | bdzxt | B | Dec. 6, 2019, 9:37 a.m. | OK | GNU C++14 | TESTS | 150 | 31 | 0 | 1900 | |
67984470 | _garyhost | B | Dec. 30, 2019, 9:20 p.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
67146539 | dwbcz | B | Dec. 18, 2019, 9:05 a.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
66704429 | amoriqbalmail | B | Dec. 12, 2019, 2:34 p.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
66661993 | Kirito | B | Dec. 12, 2019, 5:05 a.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
66660830 | chenhongta0 | B | Dec. 12, 2019, 4:22 a.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
68147074 | Mr.FarFai | B | Jan. 4, 2020, 5:03 a.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
68150675 | 5130 | B | Jan. 4, 2020, 6:46 a.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
68227774 | ay2306 | B | Jan. 5, 2020, 7:54 a.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
68426739 | stArliGht | B | Jan. 9, 2020, 4:03 a.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
68628987 | ULIRE | B | Jan. 12, 2020, 1:22 a.m. | OK | GNU C++17 | TESTS | 150 | 31 | 0 | 1900 | |
66438309 | IslamTalipovTop | B | Dec. 7, 2019, 7:04 a.m. | OK | Java 11 | TESTS | 150 | 217 | 0 | 1900 | |
66652455 | OTTEBROT | B | Dec. 11, 2019, 7:55 p.m. | OK | Java 11 | TESTS | 150 | 561 | 0 | 1900 | |
69866647 | tahmidurrafid | B | Jan. 30, 2020, 8:46 p.m. | OK | Java 11 | TESTS | 150 | 841 | 307200 | 1900 | |
66520132 | agoryainov | B | Dec. 8, 2019, 9:40 p.m. | OK | Java 11 | TESTS | 150 | 920 | 0 | 1900 | |
69689977 | _IAm_PM_ | B | Jan. 28, 2020, 6:15 p.m. | OK | Java 8 | TESTS | 150 | 124 | 0 | 1900 | |
66483932 | tusharjape007 | B | Dec. 8, 2019, 5:08 a.m. | OK | Java 8 | TESTS | 150 | 124 | 0 | 1900 | |
68728808 | Megabyte | B | Jan. 13, 2020, 7:01 p.m. | OK | Java 8 | TESTS | 150 | 139 | 0 | 1900 | |
66607770 | Xylenox | B | Dec. 10, 2019, 7:24 p.m. | OK | Java 8 | TESTS | 150 | 139 | 0 | 1900 | |
66366283 | unicorn20141 | B | Dec. 5, 2019, 7:33 p.m. | OK | Java 8 | TESTS | 149 | 139 | 0 | 1900 | |
66412780 | 7dan | B | Dec. 6, 2019, 3:55 p.m. | OK | Java 8 | TESTS | 150 | 140 | 0 | 1900 | |
66395575 | fetetriste | B | Dec. 6, 2019, 10:40 a.m. | OK | Java 8 | TESTS | 150 | 140 | 0 | 1900 | |
66340429 | Harpae | B | Dec. 5, 2019, 3:29 p.m. | OK | Java 8 | TESTS | 149 | 140 | 0 | 1900 | |
66337702 | holeguma | B | Dec. 5, 2019, 3:20 p.m. | OK | Java 8 | TESTS | 149 | 140 | 0 | 1900 | |
66335190 | Sharon | B | Dec. 5, 2019, 3:12 p.m. | OK | Java 8 | TESTS | 149 | 140 | 0 | 1900 | |
66407824 | darkkcyan | B | Dec. 6, 2019, 2:15 p.m. | OK | Kotlin | TESTS | 150 | 248 | 204800 | 1900 | |
66892951 | anduturacila6 | B | Dec. 14, 2019, 10:02 p.m. | OK | Mono C# | TESTS | 150 | 78 | 5939200 | 1900 | |
67452501 | Taiber009 | B | Dec. 23, 2019, 5:09 a.m. | OK | Mono C# | TESTS | 150 | 343 | 6860800 | 1900 | |
67616165 | Taiber009 | B | Dec. 25, 2019, 5:19 p.m. | OK | Mono C# | TESTS | 150 | 373 | 6860800 | 1900 | |
66535526 | vjudge3 | B | Dec. 9, 2019, 9:27 a.m. | OK | MS C++ | TESTS | 150 | 46 | 0 | 1900 | |
66349613 | GandarfGamer | B | Dec. 5, 2019, 4:03 p.m. | OK | MS C++ 2017 | TESTS | 149 | 31 | 3481600 | 1900 | |
66576763 | Davit93 | B | Dec. 10, 2019, 7:41 a.m. | OK | MS C++ 2017 | TESTS | 150 | 46 | 307200 | 1900 | |
66535743 | catplatypus | B | Dec. 9, 2019, 9:32 a.m. | OK | MS C++ 2017 | TESTS | 150 | 46 | 307200 | 1900 | |
68959226 | AleksanderBalobanov | B | Jan. 16, 2020, 10:39 p.m. | OK | MS C++ 2017 | TESTS | 150 | 46 | 1024000 | 1900 | |
66361266 | Ivan11 | B | Dec. 5, 2019, 6:07 p.m. | OK | MS C++ 2017 | TESTS | 149 | 61 | 409600 | 1900 | |
66612536 | Ancient_mage | B | Dec. 10, 2019, 11:23 p.m. | OK | MS C++ 2017 | TESTS | 150 | 77 | 1024000 | 1900 | |
66374824 | Timonnable | B | Dec. 6, 2019, 1:58 a.m. | OK | MS C++ 2017 | TESTS | 150 | 78 | 1536000 | 1900 | |
66353563 | AlexanderL | B | Dec. 5, 2019, 4:18 p.m. | OK | MS C++ 2017 | TESTS | 149 | 78 | 1638400 | 1900 | |
66337625 | Khas_Profit_LLC | B | Dec. 5, 2019, 3:19 p.m. | OK | MS C++ 2017 | TESTS | 149 | 78 | 1638400 | 1900 | |
66412870 | mayakin | B | Dec. 6, 2019, 3:57 p.m. | OK | PHP | TESTS | 150 | 139 | 7987200 | 1900 | |
66795710 | jolt.tks | B | Dec. 13, 2019, 4:59 p.m. | OK | PyPy 2 | TESTS | 150 | 140 | 3174400 | 1900 | |
66520314 | yumtam | B | Dec. 8, 2019, 9:49 p.m. | OK | PyPy 2 | TESTS | 150 | 186 | 8806400 | 1900 | |
68002270 | Isomorphism | B | Dec. 31, 2019, 11:28 a.m. | OK | PyPy 3 | TESTS | 150 | 171 | 8601600 | 1900 | |
66372896 | tycyd | B | Dec. 5, 2019, 11:59 p.m. | OK | PyPy 3 | TESTS | 150 | 171 | 9318400 | 1900 | |
66372872 | tycyd | B | Dec. 5, 2019, 11:57 p.m. | OK | PyPy 3 | TESTS | 150 | 171 | 9318400 | 1900 | |
66373785 | juppy | B | Dec. 6, 2019, 12:59 a.m. | OK | PyPy 3 | TESTS | 150 | 187 | 9932800 | 1900 | |
67313082 | 19n1900011773 | B | Dec. 21, 2019, 4:23 a.m. | OK | PyPy 3 | TESTS | 150 | 202 | 6656000 | 1900 | |
66372922 | tycyd | B | Dec. 6, 2019, midnight | OK | PyPy 3 | TESTS | 150 | 202 | 9318400 | 1900 | |
68566253 | Sud_geek | B | Jan. 10, 2020, 9:30 p.m. | OK | PyPy 3 | TESTS | 150 | 202 | 9932800 | 1900 | |
66566142 | scheduler | B | Dec. 9, 2019, 10:18 p.m. | OK | PyPy 3 | TESTS | 150 | 202 | 12697600 | 1900 | |
66340426 | asvasil | B | Dec. 5, 2019, 3:29 p.m. | OK | PyPy 3 | TESTS | 149 | 218 | 9830400 | 1900 | |
68619778 | shanu_im | B | Jan. 11, 2020, 7:01 p.m. | OK | PyPy 3 | TESTS | 150 | 218 | 9932800 | 1900 | |
66670921 | sungsung3201 | B | Dec. 12, 2019, 9:17 a.m. | OK | Python 3 | TESTS | 150 | 124 | 921600 | 1900 | |
66345724 | hiphip | B | Dec. 5, 2019, 3:48 p.m. | OK | Python 3 | TESTS | 149 | 140 | 5836800 | 1900 | |
67973838 | bciobanu | B | Dec. 30, 2019, 4:04 p.m. | OK | Python 3 | TESTS | 150 | 327 | 5632000 | 1900 | |
66681605 | sritha | B | Dec. 12, 2019, 1:19 p.m. | OK | Python 3 | TESTS | 150 | 389 | 2048000 | 1900 | |
66930219 | K.Samyukta | B | Dec. 15, 2019, 7:08 a.m. | OK | Python 3 | TESTS | 150 | 467 | 2150400 | 1900 | |
66353974 | sansen | B | Dec. 5, 2019, 4:20 p.m. | OK | Rust | TESTS | 149 | 46 | 1024000 | 1900 | |
67207576 | gearjack | B | Dec. 19, 2019, 12:58 p.m. | OK | Rust | TESTS | 150 | 46 | 3379200 | 1900 | |
67776887 | gearjack | B | Dec. 28, 2019, 9:20 a.m. | OK | Rust | TESTS | 150 | 46 | 8499200 | 1900 | |
66398526 | yakamoto | B | Dec. 6, 2019, 11:35 a.m. | OK | Scala | TESTS | 150 | 607 | 2252800 | 1900 |
Back to search problems