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 |
---|---|---|---|---|---|---|
1166 | Codeforces Round 561 (Div. 2) | FINISHED | False | 7200 | 179592897 | May 17, 2019, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2201 ) | D | Cute Sequences | PROGRAMMING | binary search brute force greedy math | 2100 |
B'Given a positive integer m , we say that a sequence x_1, x_2, ... , x_n of positive integers is m -cute if for every index i such that 2 <= i <= n it holds that x_i = x_{i - 1} + x_{i - 2} + ... + x_1 + r_i for some positive integer r_i satisfying 1 <= r_i <= m . You will be given q queries consisting of three positive integers a , b and m . For each query you must determine whether or not there exists an m -cute sequence whose first term is a and whose last term is b . If such a sequence exists, you must additionally find an example of it. The first line contains an integer number q ( 1 <= q <= 10^3 ) -- the number of queries. Each of the following q lines contains three integers a , b , and m ( 1 <= a, b, m <= 10^{14} , a <= q b ), describing a single query. For each query, if no m -cute sequence whose first term is a and whose last term is b exists, print -1 . Otherwise print an integer k ( 1 <= k <= q 50 ), followed by k integers x_1, x_2, ... , x_k ( 1 <= x_i <= 10^{14} ). These integers must satisfy x_1 = a , x_k = b , and that the sequence x_1, x_2, ... , x_k is m -cute. It can be shown that under the problem constraints, for each query either no m -cute sequence exists, or there exists one with at most 50 terms. If there are multiple possible sequences, you may print any of them. Consider the sample. In the first query, the sequence 5, 6, 13, 26 is valid since 6 = 5 + bf{ color{blue} 1} , 13 = 6 + 5 + { bf color{blue} 2} and 26 = 13 + 6 + 5 + { bf color{blue} 2} have the bold values all between 1 and 2 , so the sequence is 2 -cute. Other valid sequences, such as 5, 7, 13, 26 are also accepted. In the second query, the only possible 1 -cute sequence starting at 3 is 3, 4, '... |
Codeforces Round #561 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
55702470 | denkora | D | June 18, 2019, 5:33 a.m. | OK | Clang++17 Diagnostics | TESTS | 22 | 249 | 4198400 | 2100 | |
54315298 | yshui | D | May 17, 2019, 6:09 p.m. | OK | D | TESTS | 22 | 31 | 4198400 | 2100 | |
54324749 | Denor | D | May 18, 2019, 1:38 a.m. | OK | Delphi | TESTS | 22 | 61 | 0 | 2100 | |
54349094 | PhuongPeu | D | May 18, 2019, 1:52 p.m. | OK | FPC | TESTS | 22 | 124 | 102400 | 2100 | |
54314566 | TShT | D | May 17, 2019, 5:54 p.m. | OK | FPC | TESTS | 22 | 155 | 3174400 | 2100 | |
54308752 | rainboy | D | May 17, 2019, 4:50 p.m. | OK | GNU C11 | TESTS | 22 | 156 | 0 | 2100 | |
54715268 | dpritam | D | May 27, 2019, 12:53 p.m. | OK | GNU C11 | TESTS | 22 | 171 | 0 | 2100 | |
54335336 | vjudge3 | D | May 18, 2019, 7:53 a.m. | OK | GNU C++11 | TESTS | 22 | 30 | 0 | 2100 | |
54333097 | POWERRR | D | May 18, 2019, 6:52 a.m. | OK | GNU C++11 | TESTS | 22 | 30 | 0 | 2100 | |
54311322 | TOPCYBERFLOWER | D | May 17, 2019, 5:01 p.m. | OK | GNU C++11 | TESTS | 22 | 30 | 0 | 2100 | |
69894578 | liuweih | D | Jan. 31, 2020, 11:19 a.m. | OK | GNU C++11 | TESTS | 22 | 31 | 0 | 2100 | |
64295392 | henu-wxj | D | Nov. 5, 2019, 8:27 a.m. | OK | GNU C++11 | TESTS | 22 | 31 | 0 | 2100 | |
61397678 | luogu_bot2 | D | Sept. 28, 2019, 3:23 a.m. | OK | GNU C++11 | TESTS | 22 | 31 | 0 | 2100 | |
58961143 | eason2012 | D | Aug. 17, 2019, 3:20 p.m. | OK | GNU C++11 | TESTS | 22 | 31 | 0 | 2100 | |
58489044 | lalalafloat | D | Aug. 9, 2019, 8:51 a.m. | OK | GNU C++11 | TESTS | 22 | 31 | 0 | 2100 | |
64672317 | chenyewei_1234 | D | Nov. 11, 2019, 6:32 a.m. | OK | GNU C++11 | TESTS | 22 | 31 | 0 | 2100 | |
66544184 | vjudge4 | D | Dec. 9, 2019, 12:37 p.m. | OK | GNU C++11 | TESTS | 22 | 31 | 0 | 2100 | |
54477556 | oneplus54 | D | May 22, 2019, 9:18 a.m. | OK | GNU C++14 | TESTS | 22 | 15 | 0 | 2100 | |
56656772 | bazsi700 | D | July 7, 2019, 8:49 a.m. | OK | GNU C++14 | TESTS | 22 | 30 | 0 | 2100 | |
61425158 | PRT | D | Sept. 28, 2019, 12:56 p.m. | OK | GNU C++14 | TESTS | 22 | 30 | 0 | 2100 | |
58267821 | _FlyingColor_ | D | Aug. 4, 2019, 3:25 p.m. | OK | GNU C++14 | TESTS | 22 | 30 | 0 | 2100 | |
55815042 | LilMeyer | D | June 20, 2019, 6:03 a.m. | OK | GNU C++14 | TESTS | 22 | 30 | 0 | 2100 | |
55703613 | YJU | D | June 18, 2019, 6:21 a.m. | OK | GNU C++14 | TESTS | 22 | 30 | 0 | 2100 | |
54895807 | mayiyang | D | June 1, 2019, 2:37 a.m. | OK | GNU C++14 | TESTS | 22 | 30 | 0 | 2100 | |
54693390 | Poimidorka | D | May 26, 2019, 5:48 p.m. | OK | GNU C++14 | TESTS | 22 | 30 | 0 | 2100 | |
54542771 | pract | D | May 24, 2019, 3:39 a.m. | OK | GNU C++14 | TESTS | 22 | 30 | 0 | 2100 | |
54447490 | Arpanet | D | May 21, 2019, 12:02 p.m. | OK | GNU C++14 | TESTS | 22 | 30 | 0 | 2100 | |
54474045 | Edwivv | D | May 22, 2019, 7:20 a.m. | OK | GNU C++17 | TESTS | 22 | 15 | 0 | 2100 | |
54515909 | gtx1080 | D | May 23, 2019, 9:50 a.m. | OK | GNU C++17 | TESTS | 22 | 15 | 0 | 2100 | |
54580785 | NelsonGomesNeto | D | May 25, 2019, 4:36 a.m. | OK | GNU C++17 | TESTS | 22 | 30 | 0 | 2100 | |
54473411 | fufck | D | May 22, 2019, 6:57 a.m. | OK | GNU C++17 | TESTS | 22 | 30 | 0 | 2100 | |
54415609 | VioletSaber | D | May 20, 2019, 12:24 p.m. | OK | GNU C++17 | TESTS | 22 | 30 | 0 | 2100 | |
55715804 | __4444x__ | D | June 18, 2019, 12:38 p.m. | OK | GNU C++17 | TESTS | 22 | 30 | 0 | 2100 | |
54414208 | hyacinthLJP | D | May 20, 2019, 11:41 a.m. | OK | GNU C++17 | TESTS | 22 | 30 | 0 | 2100 | |
54408216 | javad_asadi | D | May 20, 2019, 7:55 a.m. | OK | GNU C++17 | TESTS | 22 | 30 | 0 | 2100 | |
54414501 | hyacinthLJP | D | May 20, 2019, 11:49 a.m. | OK | GNU C++17 | TESTS | 22 | 30 | 0 | 2100 | |
54656709 | Rudy358 | D | May 26, 2019, 8:46 a.m. | OK | GNU C++17 | TESTS | 22 | 30 | 0 | 2100 | |
65603960 | machhra | D | Nov. 23, 2019, 7:32 p.m. | OK | Java 11 | TESTS | 22 | 202 | 0 | 2100 | |
54442632 | dalt | D | May 21, 2019, 9:31 a.m. | OK | Java 8 | TESTS | 22 | 109 | 0 | 2100 | |
66500693 | jakejase2 | D | Dec. 8, 2019, 12:25 p.m. | OK | Java 8 | TESTS | 22 | 124 | 0 | 2100 | |
66301806 | Agnimandur | D | Dec. 5, 2019, 7:35 a.m. | OK | Java 8 | TESTS | 22 | 124 | 0 | 2100 | |
54360194 | SpargelTarzan | D | May 18, 2019, 8:03 p.m. | OK | Java 8 | TESTS | 22 | 124 | 0 | 2100 | |
54319019 | 4mda4mda | D | May 17, 2019, 7:49 p.m. | OK | Java 8 | TESTS | 22 | 124 | 0 | 2100 | |
54317915 | Dukkha | D | May 17, 2019, 7:16 p.m. | OK | Java 8 | TESTS | 22 | 124 | 0 | 2100 | |
54315563 | PrakharJain | D | May 17, 2019, 6:15 p.m. | OK | Java 8 | TESTS | 22 | 124 | 0 | 2100 | |
54314396 | Nutella3000 | D | May 17, 2019, 5:52 p.m. | OK | Java 8 | TESTS | 22 | 124 | 0 | 2100 | |
54314046 | TheRaven | D | May 17, 2019, 5:46 p.m. | OK | Java 8 | TESTS | 22 | 124 | 0 | 2100 | |
54302713 | holeguma | D | May 17, 2019, 4:19 p.m. | OK | Java 8 | TESTS | 22 | 124 | 0 | 2100 | |
54522928 | armoking | D | May 23, 2019, 1:06 p.m. | OK | Kotlin | TESTS | 22 | 155 | 0 | 2100 | |
54523031 | armoking | D | May 23, 2019, 1:09 p.m. | OK | Kotlin | TESTS | 22 | 155 | 0 | 2100 | |
54729125 | Deemo | D | May 27, 2019, 9:35 p.m. | OK | Kotlin | TESTS | 22 | 202 | 204800 | 2100 | |
54652528 | camypaper | D | May 26, 2019, 6:22 a.m. | OK | Mono C# | TESTS | 22 | 61 | 3072000 | 2100 | |
54407605 | azukun | D | May 20, 2019, 7:29 a.m. | OK | Mono C# | TESTS | 22 | 61 | 4608000 | 2100 | |
54308277 | kuuso | D | May 17, 2019, 4:48 p.m. | OK | Mono C# | TESTS | 22 | 62 | 3072000 | 2100 | |
54511426 | claw88 | D | May 23, 2019, 7:20 a.m. | OK | Mono C# | TESTS | 22 | 77 | 3072000 | 2100 | |
54862385 | eki | D | May 31, 2019, 3:27 a.m. | OK | Mono C# | TESTS | 22 | 171 | 3072000 | 2100 | |
54571872 | TrabajoNocturno | D | May 24, 2019, 7:50 p.m. | OK | Mono C# | TESTS | 22 | 171 | 71987200 | 2100 | |
54369633 | MiuraMiuMiu | D | May 19, 2019, 5:52 a.m. | OK | Mono C# | TESTS | 22 | 280 | 1945600 | 2100 | |
54348218 | sergmel | D | May 18, 2019, 1:29 p.m. | OK | Mono C# | TESTS | 22 | 373 | 3174400 | 2100 | |
54304450 | gs11008 | D | May 17, 2019, 4:28 p.m. | OK | MS C++ | TESTS | 22 | 46 | 0 | 2100 | |
54805469 | vjudge4 | D | May 29, 2019, 1:52 p.m. | OK | MS C++ | TESTS | 22 | 46 | 0 | 2100 | |
56644175 | vjudge3 | D | July 7, 2019, 5:03 a.m. | OK | MS C++ | TESTS | 22 | 46 | 0 | 2100 | |
54679121 | vjudge3 | D | May 26, 2019, 4:09 p.m. | OK | MS C++ | TESTS | 22 | 61 | 1638400 | 2100 | |
59436515 | Yanhui | D | Aug. 25, 2019, 9:04 a.m. | OK | MS C++ 2017 | TESTS | 22 | 46 | 0 | 2100 | |
54319198 | siwei | D | May 17, 2019, 7:55 p.m. | OK | MS C++ 2017 | TESTS | 22 | 46 | 0 | 2100 | |
54311126 | youx | D | May 17, 2019, 5 p.m. | OK | MS C++ 2017 | TESTS | 22 | 46 | 0 | 2100 | |
54337898 | Miris | D | May 18, 2019, 8:58 a.m. | OK | MS C++ 2017 | TESTS | 22 | 46 | 0 | 2100 | |
55214664 | ItsNikolor | D | June 6, 2019, 4:09 p.m. | OK | MS C++ 2017 | TESTS | 22 | 46 | 1126400 | 2100 | |
59436480 | Yanhui | D | Aug. 25, 2019, 9:03 a.m. | OK | MS C++ 2017 | TESTS | 22 | 61 | 0 | 2100 | |
55039476 | st1vdy | D | June 3, 2019, 3:03 p.m. | OK | MS C++ 2017 | TESTS | 22 | 62 | 0 | 2100 | |
63909500 | AleksanderBalobanov | D | Oct. 31, 2019, 7:45 a.m. | OK | MS C++ 2017 | TESTS | 22 | 62 | 0 | 2100 | |
54510211 | 0-jij-0 | D | May 23, 2019, 6:40 a.m. | OK | MS C++ 2017 | TESTS | 22 | 62 | 102400 | 2100 | |
54337349 | wisest | D | May 18, 2019, 8:44 a.m. | OK | MS C++ 2017 | TESTS | 22 | 77 | 0 | 2100 | |
60907170 | pajenegod | D | Sept. 20, 2019, 3:20 a.m. | OK | PyPy 2 | TESTS | 22 | 280 | 4915200 | 2100 | |
54465431 | cherry_su | D | May 21, 2019, 10:56 p.m. | OK | PyPy 2 | TESTS | 22 | 311 | 5324800 | 2100 | |
67148341 | aaa_bbb_ccc | D | Dec. 18, 2019, 9:45 a.m. | OK | PyPy 2 | TESTS | 22 | 373 | 5222400 | 2100 | |
54314097 | _kawaii_neko_ | D | May 17, 2019, 5:47 p.m. | OK | PyPy 2 | TESTS | 22 | 717 | 7782400 | 2100 | |
54340974 | Letmecry | D | May 18, 2019, 10:18 a.m. | OK | PyPy 3 | TESTS | 22 | 249 | 2355200 | 2100 | |
54313389 | SoulTch | D | May 17, 2019, 5:38 p.m. | OK | PyPy 3 | TESTS | 22 | 265 | 4505600 | 2100 | |
54313082 | pineriver | D | May 17, 2019, 5:35 p.m. | OK | PyPy 3 | TESTS | 22 | 265 | 5222400 | 2100 | |
54525034 | Mint_Dentifrice | D | May 23, 2019, 2:05 p.m. | OK | PyPy 3 | TESTS | 22 | 296 | 8192000 | 2100 | |
54805941 | VladProg | D | May 29, 2019, 2:08 p.m. | OK | PyPy 3 | TESTS | 22 | 327 | 6348800 | 2100 | |
54316946 | malylesio | D | May 17, 2019, 6:49 p.m. | OK | PyPy 3 | TESTS | 22 | 358 | 8192000 | 2100 | |
54707383 | Guendabiaani | D | May 27, 2019, 5:57 a.m. | OK | PyPy 3 | TESTS | 22 | 405 | 8499200 | 2100 | |
54333308 | phoenix28 | D | May 18, 2019, 6:57 a.m. | OK | Python 2 | TESTS | 22 | 218 | 102400 | 2100 | |
59391984 | -Morass- | D | Aug. 24, 2019, 8:54 a.m. | OK | Python 2 | TESTS | 22 | 452 | 307200 | 2100 | |
54310392 | nwi | D | May 17, 2019, 4:57 p.m. | OK | Python 2 | TESTS | 22 | 467 | 307200 | 2100 | |
56142779 | nikunjpatel | D | June 27, 2019, 4:25 a.m. | OK | Python 3 | TESTS | 22 | 202 | 0 | 2100 | |
54403666 | whatshisbucket | D | May 20, 2019, 3:58 a.m. | OK | Python 3 | TESTS | 22 | 202 | 0 | 2100 | |
54314929 | potpath | D | May 17, 2019, 6:01 p.m. | OK | Python 3 | TESTS | 22 | 202 | 0 | 2100 | |
54448134 | Avny | D | May 21, 2019, 12:19 p.m. | OK | Python 3 | TESTS | 22 | 217 | 0 | 2100 | |
54322439 | IngaleAnkur10 | D | May 17, 2019, 10:41 p.m. | OK | Python 3 | TESTS | 22 | 217 | 307200 | 2100 | |
54323160 | NocturneBflat | D | May 17, 2019, 11:37 p.m. | OK | Python 3 | TESTS | 22 | 233 | 307200 | 2100 | |
54313647 | BayMinimum | D | May 17, 2019, 5:41 p.m. | OK | Python 3 | TESTS | 22 | 249 | 0 | 2100 | |
64347775 | MinecraftFuns | D | Nov. 6, 2019, 7:07 a.m. | OK | Python 3 | TESTS | 22 | 249 | 307200 | 2100 | |
54337267 | oweeifn | D | May 18, 2019, 8:42 a.m. | OK | Python 3 | TESTS | 22 | 249 | 307200 | 2100 | |
54329862 | Mevan_Niluminda | D | May 18, 2019, 5:15 a.m. | OK | Python 3 | TESTS | 22 | 264 | 307200 | 2100 | |
65326524 | sansen | D | Nov. 19, 2019, 1:59 a.m. | OK | Rust | TESTS | 22 | 31 | 102400 | 2100 | |
54310524 | yakamoto | D | May 17, 2019, 4:58 p.m. | OK | Scala | TESTS | 22 | 545 | 0 | 2100 |
Back to search problems