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 |
---|---|---|---|---|---|---|
960 | Divide by Zero 2018 and Codeforces Round 474 (Div. 1 + Div. 2, combined) | FINISHED | False | 9000 | 208706099 | April 7, 2018, 4:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1073 ) | G | Bandit Blues | PROGRAMMING | combinatorics dp fft math | 2800 |
B'Japate, while traveling through the forest of Mala, saw N bags of gold lying in a row. Each bag has some distinct weight of gold between 1 to N. Japate can carry only one bag of gold with him, so he uses the following strategy to choose a bag. Initially, he starts with an empty bag (zero weight). He considers the bags in some order. If the current bag has a higher weight than the bag in his hand, he picks the current bag. Japate put the bags in some order. Japate realizes that he will pick A bags, if he starts picking bags from the front, and will pick B bags, if he starts picking bags from the back. By picking we mean replacing the bag in his hand with the current one. Now he wonders how many permutations of bags are possible, in which he picks A bags from the front and B bags from back using the above strategy. Since the answer can be very large, output it modulo 998244353. The only line of input contains three space separated integers N (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89N xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105), A and B (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89A, xe2 x80 x89B xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89N). Output a single integer -- the number of valid permutations modulo 998244353. In sample case 1, the only possible permutation is [1] In sample cases 2 and 3, only two permutations of size 2 are possible:{[1, xe2 x80 x892], xe2 x80 x89[2, xe2 x80 x891]}. The values of a and b for first permutation is 2 and 1, and for the second permutation these values are 1 and 2. In sample case 4, out of 120 permutations of [1, xe2 x80 x892, xe2 x80 x893, xe2 x80 x894, xe2 x80 x895] possible, only 22 satisfy the given constraints of a and b. '... |
Divide by Zero 2018 and Codeforces Round #474 (Div. 1 + Div. 2, combined) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
40465761 | luogu_bot5 | G | July 17, 2018, 6:42 a.m. | OK | GNU C++ | TESTS | 74 | 171 | 25190400 | 2800 | |
37119039 | _SHENZHEBEI_ | G | April 9, 2018, 10:51 a.m. | OK | GNU C++ | TESTS | 74 | 295 | 88883200 | 2800 | |
37479484 | vjudge4 | G | April 20, 2018, 7:11 a.m. | OK | GNU C++ | TESTS | 74 | 358 | 9420800 | 2800 | |
37476038 | jefflyy | G | April 20, 2018, 2:39 a.m. | OK | GNU C++ | TESTS | 74 | 390 | 9625600 | 2800 | |
37118926 | _SHENZHEBEI_ | G | April 9, 2018, 10:45 a.m. | OK | GNU C++ | TESTS | 74 | 390 | 88883200 | 2800 | |
37114762 | vjudge5 | G | April 9, 2018, 6:39 a.m. | OK | GNU C++ | TESTS | 74 | 436 | 20377600 | 2800 | |
37074093 | JOHNKRAM | G | April 7, 2018, 5:50 p.m. | OK | GNU C++ | TESTS | 74 | 545 | 15564800 | 2800 | |
37262289 | langsike | G | April 13, 2018, 12:23 a.m. | OK | GNU C++ | TESTS | 74 | 577 | 27852800 | 2800 | |
37246739 | zhhx | G | April 12, 2018, 11:15 a.m. | OK | GNU C++ | TESTS | 74 | 732 | 40243200 | 2800 | |
38209529 | Scut82 | G | May 14, 2018, 8:49 a.m. | OK | GNU C++ | TESTS | 74 | 936 | 11980800 | 2800 | |
61093348 | liqing | G | Sept. 23, 2019, 12:16 a.m. | OK | GNU C++11 | TESTS | 74 | 140 | 10240000 | 2800 | |
47517692 | Cyhlnj | G | Dec. 26, 2018, 11:02 a.m. | OK | GNU C++11 | TESTS | 74 | 140 | 10547200 | 2800 | |
53455632 | negiizhao | G | April 28, 2019, 2:15 a.m. | OK | GNU C++11 | TESTS | 74 | 155 | 10547200 | 2800 | |
69703774 | WZYYN | G | Jan. 29, 2020, 3:04 a.m. | OK | GNU C++11 | TESTS | 74 | 156 | 5222400 | 2800 | |
58312028 | vjudge3 | G | Aug. 5, 2019, 12:26 a.m. | OK | GNU C++11 | TESTS | 74 | 156 | 5836800 | 2800 | |
50806526 | liouzhou_101 | G | March 5, 2019, 5:56 a.m. | OK | GNU C++11 | TESTS | 74 | 156 | 14745600 | 2800 | |
37210933 | zhangzy | G | April 11, 2018, 8:40 a.m. | OK | GNU C++11 | TESTS | 74 | 156 | 33280000 | 2800 | |
48107402 | PDDNB | G | Jan. 9, 2019, 6:36 a.m. | OK | GNU C++11 | TESTS | 74 | 171 | 10854400 | 2800 | |
47260461 | yybyyb | G | Dec. 19, 2018, 12:10 p.m. | OK | GNU C++11 | TESTS | 74 | 171 | 10854400 | 2800 | |
47260458 | luogu_bot2 | G | Dec. 19, 2018, 12:10 p.m. | OK | GNU C++11 | TESTS | 74 | 171 | 10854400 | 2800 | |
50498954 | liouzhou_101 | G | Feb. 25, 2019, 4:22 p.m. | OK | GNU C++14 | TESTS | 74 | 124 | 4198400 | 2800 | |
50499638 | liouzhou_101 | G | Feb. 25, 2019, 4:40 p.m. | OK | GNU C++14 | TESTS | 74 | 124 | 4710400 | 2800 | |
50499604 | liouzhou_101 | G | Feb. 25, 2019, 4:39 p.m. | OK | GNU C++14 | TESTS | 74 | 124 | 4710400 | 2800 | |
47174287 | Rezwan.Arefin01 | G | Dec. 17, 2018, 4:40 p.m. | OK | GNU C++14 | TESTS | 74 | 124 | 5529600 | 2800 | |
50498681 | liouzhou_101 | G | Feb. 25, 2019, 4:14 p.m. | OK | GNU C++14 | TESTS | 74 | 124 | 7372800 | 2800 | |
50498920 | liouzhou_101 | G | Feb. 25, 2019, 4:21 p.m. | OK | GNU C++14 | TESTS | 74 | 139 | 4198400 | 2800 | |
47173903 | Rezwan.Arefin01 | G | Dec. 17, 2018, 4:28 p.m. | OK | GNU C++14 | TESTS | 74 | 139 | 5529600 | 2800 | |
50498353 | liouzhou_101 | G | Feb. 25, 2019, 4:07 p.m. | OK | GNU C++14 | TESTS | 74 | 140 | 6348800 | 2800 | |
50497776 | liouzhou_101 | G | Feb. 25, 2019, 3:53 p.m. | OK | GNU C++14 | TESTS | 74 | 140 | 6348800 | 2800 | |
50822435 | liouzhou_101 | G | March 5, 2019, 2:06 p.m. | OK | GNU C++14 | TESTS | 74 | 140 | 14745600 | 2800 | |
53738922 | NewClno1 | G | May 4, 2019, 12:39 p.m. | OK | GNU C++17 | TESTS | 74 | 171 | 10854400 | 2800 | |
59540344 | YouKn0wWho | G | Aug. 26, 2019, 6:37 p.m. | OK | GNU C++17 | TESTS | 74 | 202 | 7782400 | 2800 | |
55957991 | jiangtao | G | June 23, 2019, 8:12 a.m. | OK | GNU C++17 | TESTS | 74 | 217 | 9625600 | 2800 | |
52234867 | idxcalccalc | G | April 2, 2019, 1:22 p.m. | OK | GNU C++17 | TESTS | 74 | 218 | 11468800 | 2800 | |
51434164 | 374272 | G | March 18, 2019, 4:51 a.m. | OK | GNU C++17 | TESTS | 74 | 233 | 16793600 | 2800 | |
51434133 | luogu_bot1 | G | March 18, 2019, 4:48 a.m. | OK | GNU C++17 | TESTS | 74 | 233 | 16793600 | 2800 | |
48271211 | 616156 | G | Jan. 12, 2019, 2:16 a.m. | OK | GNU C++17 | TESTS | 74 | 234 | 25600000 | 2800 | |
55015480 | HirasawaaYui | G | June 3, 2019, 12:08 p.m. | OK | GNU C++17 | TESTS | 74 | 234 | 25804800 | 2800 | |
59539841 | YouKn0wWho | G | Aug. 26, 2019, 6:24 p.m. | OK | GNU C++17 | TESTS | 74 | 249 | 7782400 | 2800 | |
41234992 | ezoilearner | G | Aug. 5, 2018, 6:42 a.m. | OK | GNU C++17 | TESTS | 74 | 280 | 5632000 | 2800 | |
60666968 | dalt | G | Sept. 16, 2019, 8:38 a.m. | OK | Java 8 | TESTS | 74 | 701 | 0 | 2800 | |
37075207 | uwi | G | April 7, 2018, 5:59 p.m. | OK | Java 8 | TESTS | 74 | 1591 | 38912000 | 2800 |
Back to search problems