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 |
---|---|---|---|---|---|---|
1853 | Codeforces Round 887 (Div. 2) | FINISHED | False | 9000 | 41700299 | July 23, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 17575 ) | B | Fibonaccharsis | PROGRAMMING | binary search brute force math |
B'Ntarsis has received two integers n and k for his birthday. He wonders how many fibonacci-like sequences of length k can be formed with n as the k -th element of the sequence. A sequence of non-decreasing non-negative integers is considered fibonacci-like if f_i = f_{i-1} + f_{i-2} for all i > 2 , where f_i denotes the i -th element in the sequence. Note that f_1 and f_2 can be arbitrary. For example, sequences such as [4,5,9,14] and [0,1,1] are considered fibonacci-like sequences, while [0,0,0,1,1] , [1, 2, 1, 3] , and [-1,-1,-2] are not: the first two do not always satisfy f_i = f_{i-1} + f_{i-2} , the latter does not satisfy that the elements are non-negative. Impress Ntarsis by helping him with this task. The first line contains an integer t ( 1 <= q t <= q 2 cdot 10^5 ), the number of test cases. The description of each test case is as follows. Each test case contains two integers, n and k ( 1 <= q n <= q 2 cdot 10^5 , 3 <= q k <= q 10^9 ). It is guaranteed the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case output an integer, the number of fibonacci-like sequences of length k such that the k -th element in the sequence is n . That is, output the number of sequences f of length k so f is a fibonacci-like sequence and f_k = n . It can be shown this number is finite. There are 4 valid fibonacci-like sequences for n = 22 , k = 4 : For n = 3 , k = 9 , it can be shown that there are no fibonacci-like sequences satisfying the given conditions. For n = 55 , k = 11 , [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55] is the only fibonacci-like sequence. '... |
Codeforces Round 887 (Div 1, Div 2) Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
215283711 | BritoAlv | B | July 24, 2023, 12:53 a.m. | OK | C# 10 | TESTS | 34 | 1091 | 5632000 | ||
215266215 | Alfafox | B | July 23, 2023, 7:35 p.m. | OK | C# 10 | TESTS | 34 | 1185 | 3276800 | ||
215307048 | tzc_22_slk | B | July 24, 2023, 6:01 a.m. | OK | Clang++17 Diagnostics | TESTS | 34 | 1419 | 1945600 | ||
215262909 | NenadDapic | B | July 23, 2023, 6:54 p.m. | OK | FPC | TESTS | 34 | 592 | 921600 | ||
215263496 | NenadDapic | B | July 23, 2023, 7:01 p.m. | OK | FPC | TESTS | 34 | 623 | 921600 | ||
215237073 | VanLam_05 | B | July 23, 2023, 4:11 p.m. | OK | FPC | TESTS | 34 | 624 | 819200 | ||
215264573 | eastnman | B | July 23, 2023, 7:15 p.m. | OK | FPC | TESTS | 34 | 639 | 204800 | ||
215263807 | eastnman | B | July 23, 2023, 7:05 p.m. | OK | FPC | TESTS | 34 | 639 | 204800 | ||
215263308 | NenadDapic | B | July 23, 2023, 6:59 p.m. | OK | FPC | TESTS | 34 | 639 | 921600 | ||
215284895 | altper | B | July 24, 2023, 1:12 a.m. | OK | GNU C11 | TESTS | 34 | 811 | 0 | ||
215236882 | 1435730 | B | July 23, 2023, 4:10 p.m. | OK | GNU C11 | TESTS | 34 | 842 | 0 | ||
215240003 | divyanshudubey2002 | B | July 23, 2023, 4:22 p.m. | OK | GNU C11 | TESTS | 34 | 857 | 0 | ||
215236176 | Zzzcr | B | July 23, 2023, 4:08 p.m. | OK | GNU C++14 | TESTS | 34 | 15 | 4198400 | ||
215239451 | lostintianyi | B | July 23, 2023, 4:19 p.m. | OK | GNU C++14 | TESTS | 34 | 31 | 1024000 | ||
215243854 | wangjingxu | B | July 23, 2023, 4:36 p.m. | OK | GNU C++14 | TESTS | 34 | 77 | 819200 | ||
215254893 | Belief_yfly | B | July 23, 2023, 5:48 p.m. | OK | GNU C++14 | TESTS | 34 | 78 | 0 | ||
215249850 | _xm_ | B | July 23, 2023, 4:59 p.m. | OK | GNU C++14 | TESTS | 34 | 78 | 0 | ||
215244017 | codewyx | B | July 23, 2023, 4:37 p.m. | OK | GNU C++14 | TESTS | 34 | 78 | 0 | ||
215256805 | jujujujujudi | B | July 23, 2023, 5:59 p.m. | OK | GNU C++14 | TESTS | 34 | 78 | 0 | ||
215284908 | smilingandweeping | B | July 24, 2023, 1:13 a.m. | OK | GNU C++14 | TESTS | 34 | 78 | 0 | ||
215297698 | scu_zzk | B | July 24, 2023, 4:05 a.m. | OK | GNU C++14 | TESTS | 34 | 78 | 0 | ||
215288110 | fengshengwei | B | July 24, 2023, 2:01 a.m. | OK | GNU C++14 | TESTS | 34 | 78 | 819200 | ||
215235757 | Ceanai | B | July 23, 2023, 4:07 p.m. | OK | GNU C++17 | TESTS | 34 | 78 | 0 | ||
215235283 | skq | B | July 23, 2023, 4:05 p.m. | OK | GNU C++17 | TESTS | 34 | 78 | 0 | ||
215245558 | _Eren_ | B | July 23, 2023, 4:43 p.m. | OK | GNU C++17 | TESTS | 34 | 78 | 0 | ||
215282747 | Dakkar_7 | B | July 24, 2023, 12:34 a.m. | OK | GNU C++17 | TESTS | 34 | 78 | 0 | ||
215259302 | vito1036 | B | July 23, 2023, 6:19 p.m. | OK | GNU C++17 | TESTS | 34 | 78 | 0 | ||
215238243 | Chloris_Black | B | July 23, 2023, 4:15 p.m. | OK | GNU C++17 | TESTS | 34 | 78 | 74547200 | ||
215282868 | ccsu_zx | B | July 24, 2023, 12:37 a.m. | OK | GNU C++17 | TESTS | 34 | 93 | 0 | ||
215282772 | ccsu_zx | B | July 24, 2023, 12:35 a.m. | OK | GNU C++17 | TESTS | 34 | 93 | 0 | ||
215284871 | SF-Manman | B | July 24, 2023, 1:12 a.m. | OK | GNU C++17 | TESTS | 34 | 93 | 0 | ||
215283071 | Destiny. | B | July 24, 2023, 12:41 a.m. | OK | GNU C++17 | TESTS | 34 | 93 | 0 | ||
215255622 | Anish_Singh_Dhami_07 | B | July 23, 2023, 5:52 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 61 | 204800 | ||
215300983 | andhitoofan | B | July 24, 2023, 4:51 a.m. | OK | GNU C++17 (64) | TESTS | 34 | 62 | 0 | ||
215294990 | abdulla.bin.ah | B | July 24, 2023, 3:27 a.m. | OK | GNU C++17 (64) | TESTS | 34 | 62 | 0 | ||
215274058 | awesomeguy856 | B | July 23, 2023, 9:18 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 62 | 0 | ||
215258877 | shuvocoder2025 | B | July 23, 2023, 6:16 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 62 | 0 | ||
215237707 | harsh_8484 | B | July 23, 2023, 4:13 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 62 | 0 | ||
215265053 | anupamojha__21 | B | July 23, 2023, 7:21 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 62 | 3174400 | ||
215240582 | Alkaser_ID | B | July 23, 2023, 4:24 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 62 | 4812800 | ||
215306079 | HarshiL_MalanI07 | B | July 24, 2023, 5:50 a.m. | OK | GNU C++17 (64) | TESTS | 34 | 77 | 0 | ||
215306685 | Zhak_RMukh | B | July 24, 2023, 5:57 a.m. | OK | GNU C++17 (64) | TESTS | 34 | 77 | 0 | ||
215267226 | Ferrriccc | B | July 23, 2023, 7:46 p.m. | OK | GNU C++20 (64) | TESTS | 34 | 15 | 0 | ||
215259131 | CLT | B | July 23, 2023, 6:18 p.m. | OK | GNU C++20 (64) | TESTS | 34 | 15 | 1945600 | ||
215302196 | Aryan_ks20 | B | July 24, 2023, 5:05 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 46 | 0 | ||
215300616 | sherry456 | B | July 24, 2023, 4:46 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 46 | 0 | ||
215298654 | simplesheep03 | B | July 24, 2023, 4:19 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 46 | 0 | ||
215298157 | ami_2025 | B | July 24, 2023, 4:12 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 46 | 0 | ||
215296352 | ami_2025 | B | July 24, 2023, 3:45 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 46 | 0 | ||
215307101 | sanjay77 | B | July 24, 2023, 6:01 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 46 | 0 | ||
215303834 | LextyleO_o | B | July 24, 2023, 5:25 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 46 | 0 | ||
215304441 | vabbisht17 | B | July 24, 2023, 5:32 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 46 | 0 | ||
215242569 | O_Vladimir | B | July 23, 2023, 4:31 p.m. | OK | Go | TESTS | 34 | 140 | 4403200 | ||
215284532 | cck111 | B | July 24, 2023, 1:07 a.m. | OK | Go | TESTS | 34 | 156 | 4403200 | ||
215249049 | sushibob | B | July 23, 2023, 4:56 p.m. | OK | Java 11 | TESTS | 34 | 233 | 0 | ||
215265127 | sad_truant | B | July 23, 2023, 7:22 p.m. | OK | Java 11 | TESTS | 34 | 249 | 0 | ||
215264195 | sad_truant | B | July 23, 2023, 7:10 p.m. | OK | Java 11 | TESTS | 34 | 249 | 0 | ||
215233956 | kushwaha_vi | B | July 23, 2023, 4 p.m. | OK | Java 11 | TESTS | 34 | 264 | 0 | ||
215306276 | Nanthakumar06 | B | July 24, 2023, 5:52 a.m. | OK | Java 11 | TESTS | 34 | 265 | 0 | ||
215306359 | Nanthakumar06 | B | July 24, 2023, 5:53 a.m. | OK | Java 11 | TESTS | 34 | 280 | 0 | ||
215235381 | MuhammD_husss | B | July 23, 2023, 4:05 p.m. | OK | Java 11 | TESTS | 34 | 295 | 0 | ||
215241738 | MayhemLemon | B | July 23, 2023, 4:28 p.m. | OK | Java 11 | TESTS | 34 | 295 | 0 | ||
215239333 | Vegeks | B | July 23, 2023, 4:19 p.m. | OK | Java 11 | TESTS | 34 | 295 | 43622400 | ||
215245612 | amank12 | B | July 23, 2023, 4:44 p.m. | OK | Java 11 | TESTS | 34 | 608 | 0 | ||
215290118 | Asnkkzk | B | July 24, 2023, 2:28 a.m. | OK | Java 17 | TESTS | 34 | 202 | 512000 | ||
215257909 | Vrutik_2809 | B | July 23, 2023, 6:08 p.m. | OK | Java 17 | TESTS | 34 | 233 | 614400 | ||
215300455 | sumit2018das2004 | B | July 24, 2023, 4:44 a.m. | OK | Java 17 | TESTS | 34 | 264 | 409600 | ||
215281139 | miminguci | B | July 23, 2023, 11:57 p.m. | OK | Java 17 | TESTS | 34 | 265 | 512000 | ||
215238987 | ADust | B | July 23, 2023, 4:18 p.m. | OK | Java 17 | TESTS | 34 | 280 | 307200 | ||
215234575 | Pratham2908 | B | July 23, 2023, 4:03 p.m. | OK | Java 17 | TESTS | 34 | 280 | 409600 | ||
215282291 | one_line | B | July 24, 2023, 12:25 a.m. | OK | Java 17 | TESTS | 34 | 280 | 716800 | ||
215240206 | SamyajitDas | B | July 23, 2023, 4:22 p.m. | OK | Java 17 | TESTS | 34 | 295 | 614400 | ||
215258869 | vaibhav_1710 | B | July 23, 2023, 6:16 p.m. | OK | Java 17 | TESTS | 34 | 296 | 512000 | ||
215274779 | faresbadr316 | B | July 23, 2023, 9:31 p.m. | OK | Java 17 | TESTS | 34 | 296 | 819200 | ||
215301999 | chuquwan9964 | B | July 24, 2023, 5:02 a.m. | OK | Java 8 | TESTS | 34 | 139 | 0 | ||
215279476 | Toosid | B | July 23, 2023, 11:16 p.m. | OK | Java 8 | TESTS | 34 | 171 | 0 | ||
215258249 | mr_nobodyyy | B | July 23, 2023, 6:11 p.m. | OK | Java 8 | TESTS | 34 | 171 | 0 | ||
215274129 | Yousef_Badr | B | July 23, 2023, 9:19 p.m. | OK | Java 8 | TESTS | 34 | 186 | 0 | ||
215237030 | gtiwari912 | B | July 23, 2023, 4:11 p.m. | OK | Java 8 | TESTS | 34 | 186 | 0 | ||
215258384 | mohamedhassan_c | B | July 23, 2023, 6:12 p.m. | OK | Java 8 | TESTS | 34 | 186 | 7168000 | ||
215267176 | aspect_129 | B | July 23, 2023, 7:46 p.m. | OK | Java 8 | TESTS | 34 | 187 | 0 | ||
215275417 | qlf9 | B | July 23, 2023, 9:43 p.m. | OK | Java 8 | TESTS | 34 | 202 | 0 | ||
215240368 | 1091857051 | B | July 23, 2023, 4:23 p.m. | OK | Java 8 | TESTS | 34 | 202 | 0 | ||
215237182 | mohamedhassan_c | B | July 23, 2023, 4:11 p.m. | OK | Java 8 | TESTS | 34 | 841 | 7168000 | ||
215255577 | Tenenk | B | July 23, 2023, 5:52 p.m. | OK | MS C++ 2017 | TESTS | 34 | 358 | 0 | ||
215248337 | Galina_Basalova | B | July 23, 2023, 4:54 p.m. | OK | MS C++ 2017 | TESTS | 34 | 358 | 0 | ||
215235244 | zetxie | B | July 23, 2023, 4:05 p.m. | OK | MS C++ 2017 | TESTS | 34 | 826 | 0 | ||
215292108 | 22561940340 | B | July 24, 2023, 2:53 a.m. | OK | MS C++ 2017 | TESTS | 34 | 919 | 0 | ||
215272207 | vinzer_by_is | B | July 23, 2023, 8:50 p.m. | OK | MS C++ 2017 | TESTS | 34 | 951 | 0 | ||
215237460 | Ravitosh | B | July 23, 2023, 4:12 p.m. | OK | MS C++ 2017 | TESTS | 34 | 951 | 0 | ||
215275140 | narwalabhinav | B | July 23, 2023, 9:37 p.m. | OK | MS C++ 2017 | TESTS | 34 | 951 | 2252800 | ||
215235729 | YangTuo | B | July 23, 2023, 4:06 p.m. | OK | MS C++ 2017 | TESTS | 34 | 982 | 48128000 | ||
215246085 | zaidasad09 | B | July 23, 2023, 4:46 p.m. | OK | MS C++ 2017 | TESTS | 34 | 1014 | 0 | ||
215239349 | Dick007 | B | July 23, 2023, 4:19 p.m. | OK | MS C++ 2017 | TESTS | 34 | 1028 | 0 | ||
215247804 | surajcodeforce | B | July 23, 2023, 4:52 p.m. | OK | PHP | TESTS | 34 | 686 | 0 | ||
215305618 | andy0liang | B | July 24, 2023, 5:44 a.m. | OK | PyPy 3 | TESTS | 34 | 342 | 14131200 | ||
215255409 | jvatsal0709 | B | July 23, 2023, 5:51 p.m. | OK | PyPy 3 | TESTS | 34 | 482 | 10956800 | ||
215280752 | liupengsay | B | July 23, 2023, 11:47 p.m. | OK | PyPy 3-64 | TESTS | 34 | 140 | 9625600 | ||
215278538 | beethoven97 | B | July 23, 2023, 10:54 p.m. | OK | PyPy 3-64 | TESTS | 34 | 140 | 9625600 | ||
215266250 | person_exe | B | July 23, 2023, 7:35 p.m. | OK | PyPy 3-64 | TESTS | 34 | 140 | 10137600 | ||
215234122 | udayan8 | B | July 23, 2023, 4:01 p.m. | OK | PyPy 3-64 | TESTS | 34 | 155 | 7782400 | ||
215278274 | denilb | B | July 23, 2023, 10:48 p.m. | OK | PyPy 3-64 | TESTS | 34 | 155 | 10035200 | ||
215265123 | person_exe | B | July 23, 2023, 7:22 p.m. | OK | PyPy 3-64 | TESTS | 34 | 155 | 10137600 | ||
215259283 | rmr | B | July 23, 2023, 6:19 p.m. | OK | PyPy 3-64 | TESTS | 34 | 155 | 10240000 | ||
215254516 | kavorka | B | July 23, 2023, 5:46 p.m. | OK | PyPy 3-64 | TESTS | 34 | 171 | 8908800 | ||
215265687 | mohdaman892 | B | July 23, 2023, 7:28 p.m. | OK | PyPy 3-64 | TESTS | 34 | 171 | 9625600 | ||
215280719 | liupengsay | B | July 23, 2023, 11:45 p.m. | OK | PyPy 3-64 | TESTS | 34 | 187 | 9625600 | ||
215266189 | person_exe | B | July 23, 2023, 7:35 p.m. | OK | Python 3 | TESTS | 34 | 560 | 204800 | ||
215244965 | patulka | B | July 23, 2023, 4:41 p.m. | OK | Python 3 | TESTS | 34 | 560 | 30105600 | ||
215264644 | person_exe | B | July 23, 2023, 7:16 p.m. | OK | Python 3 | TESTS | 34 | 577 | 204800 | ||
215267797 | eugalt | B | July 23, 2023, 7:53 p.m. | OK | Python 3 | TESTS | 34 | 607 | 17203200 | ||
215257955 | eugalt | B | July 23, 2023, 6:08 p.m. | OK | Python 3 | TESTS | 34 | 607 | 17203200 | ||
215260726 | eugalt | B | July 23, 2023, 6:33 p.m. | OK | Python 3 | TESTS | 34 | 608 | 17100800 | ||
215247348 | gigala | B | July 23, 2023, 4:50 p.m. | OK | Python 3 | TESTS | 34 | 639 | 819200 | ||
215254569 | eugalt | B | July 23, 2023, 5:47 p.m. | OK | Python 3 | TESTS | 34 | 639 | 17100800 | ||
215268221 | eugalt | B | July 23, 2023, 7:58 p.m. | OK | Python 3 | TESTS | 34 | 639 | 17203200 | ||
215246670 | VelDoraA | B | July 23, 2023, 4:48 p.m. | OK | Python 3 | TESTS | 34 | 701 | 22323200 | ||
215246187 | gr8den | B | July 23, 2023, 4:46 p.m. | OK | Rust 2021 | TESTS | 34 | 31 | 0 | ||
215270634 | cptahahab | B | July 23, 2023, 8:28 p.m. | OK | Rust 2021 | TESTS | 34 | 62 | 0 | ||
215285116 | AkagiYuu | B | July 24, 2023, 1:16 a.m. | OK | Rust 2021 | TESTS | 34 | 1512 | 0 | ||
215243601 | Saumil_2021097 | B | July 23, 2023, 4:35 p.m. | OK | Rust 2021 | TESTS | 34 | 1590 | 0 | ||
215284998 | AkagiYuu | B | July 24, 2023, 1:14 a.m. | OK | Rust 2021 | TESTS | 34 | 1777 | 0 | ||
215244976 | khollbach | B | July 23, 2023, 4:41 p.m. | OK | Rust 2021 | TESTS | 34 | 1871 | 0 |
Back to search problems