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 |
---|---|---|---|---|---|---|
886 | Технокубок 2018 - Отборочный Раунд 3 | FINISHED | False | 9000 | 227022924 | Nov. 12, 2017, 4:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1062 ) | E | Maximum Element | PROGRAMMING | combinatorics dp math | 2500 |
B'One day Petya was solving a very interesting problem. But although he used many optimization techniques, his solution still got Time limit exceeded verdict. Petya conducted a thorough analysis of his program and found out that his function for finding maximum element in an array of n positive integers was too slow. Desperate, Petya decided to use a somewhat unexpected optimization using parameter k, so now his function contains the following code: That way the function iteratively checks array elements, storing the intermediate maximum, and if after k consecutive iterations that maximum has not changed, it is returned as the answer. Now Petya is interested in fault rate of his function. He asked you to find the number of permutations of integers from 1 to n such that the return value of his function on those permutations is not equal to n. Since this number could be very big, output the answer modulo 109 xe2 x80 x89+ xe2 x80 x897. The only line contains two integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106), separated by a space -- the length of the permutations and the parameter k. Output the answer to the problem modulo 109 xe2 x80 x89+ xe2 x80 x897. Permutations from second example: [4, xe2 x80 x891, xe2 x80 x892, xe2 x80 x893, xe2 x80 x895], [4, xe2 x80 x891, xe2 x80 x893, xe2 x80 x892, xe2 x80 x895], [4, xe2 x80 x892, xe2 x80 x891, xe2 x80 x893, xe2 x80 x895], [4, xe2 x80 x892, xe2 x80 x893, xe2 x80 x891, xe2 x80 x895], [4, xe2 x80 x893, xe2 x80 x891, xe2 x80 x892, xe2 x80 x895], [4, xe2 x80 x893, xe2 x80 x892, xe2 x80 x891, xe2 x80 x895]. '... |
Editorial Codeforces Round 445 (and Technocup 2018 — Elimination Round 3) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
36636585 | __stdcall | E | March 26, 2018, 9:10 a.m. | OK | GNU C++ | TESTS | 41 | 93 | 15667200 | 2500 | |
32979236 | wcy1122 | E | Dec. 6, 2017, 2:49 p.m. | OK | GNU C++ | TESTS | 41 | 124 | 26112000 | 2500 | |
41670888 | linners | E | Aug. 17, 2018, 4:57 a.m. | OK | GNU C++ | TESTS | 41 | 124 | 32051200 | 2500 | |
35905926 | vjudge2 | E | March 4, 2018, 3:19 a.m. | OK | GNU C++ | TESTS | 41 | 140 | 14131200 | 2500 | |
35777573 | vjudge2 | E | Feb. 28, 2018, 7:48 a.m. | OK | GNU C++ | TESTS | 41 | 156 | 42188800 | 2500 | |
36566732 | Zhehao | E | March 24, 2018, 7:36 a.m. | OK | GNU C++ | TESTS | 41 | 483 | 27545600 | 2500 | |
38722669 | vjudge2 | E | May 29, 2018, 3:30 p.m. | OK | GNU C++ | TESTS | 41 | 499 | 32051200 | 2500 | |
32765848 | HycFancy | E | Nov. 29, 2017, 5:25 a.m. | OK | GNU C++ | TESTS | 41 | 499 | 34099200 | 2500 | |
33020322 | AgReB | E | Dec. 8, 2017, 11:02 a.m. | OK | GNU C++ | TESTS | 41 | 529 | 66355200 | 2500 | |
32322684 | lpardosixtos | E | Nov. 15, 2017, 2:01 a.m. | OK | GNU C++ | TESTS | 41 | 732 | 24064000 | 2500 | |
59131159 | Rubbish12345 | E | Aug. 20, 2019, 11:03 a.m. | OK | GNU C++11 | TESTS | 41 | 61 | 16076800 | 2500 | |
61680470 | ffffxk | E | Oct. 2, 2019, 12:31 a.m. | OK | GNU C++11 | TESTS | 41 | 62 | 11980800 | 2500 | |
58174634 | AcFunction | E | Aug. 2, 2019, 12:36 p.m. | OK | GNU C++11 | TESTS | 41 | 62 | 11980800 | 2500 | |
68928492 | luogu_bot1 | E | Jan. 16, 2020, 10:50 a.m. | OK | GNU C++11 | TESTS | 41 | 62 | 15872000 | 2500 | |
68706902 | hyjhyj | E | Jan. 13, 2020, 11:39 a.m. | OK | GNU C++11 | TESTS | 41 | 62 | 16076800 | 2500 | |
61349429 | shzr | E | Sept. 27, 2019, 7:16 a.m. | OK | GNU C++11 | TESTS | 41 | 62 | 16076800 | 2500 | |
46819650 | luogu_bot2 | E | Dec. 9, 2018, 2:25 p.m. | OK | GNU C++11 | TESTS | 41 | 62 | 16076800 | 2500 | |
33913993 | zhouyuyang | E | Jan. 5, 2018, 1:59 a.m. | OK | GNU C++11 | TESTS | 41 | 62 | 18124800 | 2500 | |
42822707 | Tmotfl | E | Sept. 13, 2018, 7:50 a.m. | OK | GNU C++11 | TESTS | 41 | 62 | 32153600 | 2500 | |
48474011 | da32s1da | E | Jan. 17, 2019, 12:50 a.m. | OK | GNU C++11 | TESTS | 41 | 77 | 7782400 | 2500 | |
40979240 | ReaLNero1 | E | July 30, 2018, 4:59 p.m. | OK | GNU C++14 | TESTS | 41 | 62 | 11980800 | 2500 | |
45355470 | david7ch | E | Nov. 6, 2018, 8:07 a.m. | OK | GNU C++14 | TESTS | 41 | 77 | 15974400 | 2500 | |
44032995 | I_love_Y_UME | E | Oct. 9, 2018, 11:45 a.m. | OK | GNU C++14 | TESTS | 41 | 77 | 16486400 | 2500 | |
46133492 | Bartholomew | E | Nov. 24, 2018, 3:45 a.m. | OK | GNU C++14 | TESTS | 41 | 77 | 32051200 | 2500 | |
68972261 | Itst | E | Jan. 17, 2020, 7:27 a.m. | OK | GNU C++14 | TESTS | 41 | 78 | 12083200 | 2500 | |
40063686 | des1997 | E | July 7, 2018, 2:36 p.m. | OK | GNU C++14 | TESTS | 41 | 93 | 16076800 | 2500 | |
35782892 | wfj_2048 | E | Feb. 28, 2018, 11:44 a.m. | OK | GNU C++14 | TESTS | 41 | 93 | 21913600 | 2500 | |
33679056 | gaoadt | E | Dec. 27, 2017, 4:56 p.m. | OK | GNU C++14 | TESTS | 41 | 93 | 27545600 | 2500 | |
60823881 | wyxdrqc | E | Sept. 19, 2019, 2:33 a.m. | OK | GNU C++14 | TESTS | 41 | 93 | 40038400 | 2500 | |
58392111 | Even_Bao | E | Aug. 6, 2019, 2:07 p.m. | OK | GNU C++14 | TESTS | 41 | 108 | 16076800 | 2500 | |
44485789 | InvUsr | E | Oct. 18, 2018, 12:22 p.m. | OK | GNU C++17 | TESTS | 41 | 93 | 16076800 | 2500 | |
47308687 | chinmay0906 | E | Dec. 20, 2018, 6:20 p.m. | OK | GNU C++17 | TESTS | 41 | 93 | 32051200 | 2500 | |
54566851 | Ari | E | May 24, 2019, 4:57 p.m. | OK | GNU C++17 | TESTS | 41 | 93 | 40038400 | 2500 | |
58174685 | LiM_256 | E | Aug. 2, 2019, 12:37 p.m. | OK | GNU C++17 | TESTS | 41 | 108 | 16076800 | 2500 | |
48476727 | zhongyuwei | E | Jan. 17, 2019, 3:13 a.m. | OK | GNU C++17 | TESTS | 41 | 108 | 32358400 | 2500 | |
69719683 | squarepants | E | Jan. 29, 2020, 10:12 a.m. | OK | GNU C++17 | TESTS | 41 | 124 | 40038400 | 2500 | |
44019625 | xgcxgc | E | Oct. 9, 2018, 2:23 a.m. | OK | GNU C++17 | TESTS | 41 | 140 | 32051200 | 2500 | |
44019230 | xgcxgc | E | Oct. 9, 2018, 2 a.m. | OK | GNU C++17 | TESTS | 41 | 155 | 32051200 | 2500 | |
42607240 | vjudge3 | E | Sept. 7, 2018, 8:43 a.m. | OK | GNU C++17 | TESTS | 41 | 155 | 40345600 | 2500 | |
62911989 | HelloCodeforce | E | Oct. 19, 2019, 7:36 a.m. | OK | GNU C++17 | TESTS | 41 | 436 | 32051200 | 2500 | |
36999736 | vovacomua | E | April 5, 2018, 2:14 p.m. | OK | Java 8 | TESTS | 41 | 343 | 75980800 | 2500 | |
33886966 | tmwilliamlin168 | E | Jan. 3, 2018, 2:38 p.m. | OK | Java 8 | TESTS | 41 | 826 | 45363200 | 2500 | |
32351830 | azukun | E | Nov. 16, 2017, 9:54 a.m. | OK | MS C# | TESTS | 41 | 140 | 33587200 | 2500 | |
32340999 | Maffka | E | Nov. 15, 2017, 7:23 p.m. | OK | MS C++ | TESTS | 41 | 1513 | 32051200 | 2500 |
Back to search problems