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 |
|---|---|---|---|---|---|---|
| 756 | 8VC Venture Cup 2017 - Final Round | FINISHED | False | 7200 | 291296723 | Jan. 22, 2017, 6:15 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 205 ) | E | Byteland coins | PROGRAMMING | combinatorics dp math | 3200 |
There are n types of coins in Byteland. Conveniently, the denomination of the coin type k divides the denomination of the coin type k + 1 , the denomination of the coin type 1 equals 1 tugrick. The ratio of the denominations of coin types k + 1 and k equals a k . It is known that for each x there are at most 20 coin types of denomination x . Byteasar has b k coins of type k with him, and he needs to pay exactly m tugricks. It is known that Byteasar never has more than 3·10 5 coins with him. Byteasar want to know how many ways there are to pay exactly m tugricks. Two ways are different if there is an integer k such that the amount of coins of type k differs in these two ways. As all Byteland citizens, Byteasar wants to know the number of ways modulo 10 9 + 7 . The first line contains single integer n ( 1 ≤ n ≤ 3·10 5 ) — the number of coin types. The second line contains n - 1 integers a 1 , a 2 , ... , a n - 1 ( 1 ≤ a k ≤ 10 9 ) — the ratios between the coin types denominations. It is guaranteed that for each x there are at most 20 coin types of denomination x . The third line contains n non-negative integers b 1 , b 2 , ... , b n — the number of coins of each type Byteasar has. It is guaranteed that the sum of these integers doesn't exceed 3·10 5 . The fourth line contains single integer m ( 0 ≤ m < 10 10000 ) — the amount in tugricks Byteasar needs to pay. Print single integer — the number of ways to pay exactly m tugricks modulo 10 9 + 7 . In the first example Byteasar has 4 coins of denomination 1 , and he has to pay 2 tugricks. There is only one way. In the second example Byteasar has 4 coins of each of two different types of denomination 1 , he has to pay 2 tugricks. There are 3 ways: pay one coin of the first type and one coin of the other, pay two coins of the first type, and pay two coins of the second type. In the third example the denominations are equal to 1 , 3 , 9 . |
| 8VC Venture Cup 2017 — Final Round and Codeforces Round #393 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 24642396 | Dylans | E | Feb. 14, 2017, 5:47 a.m. | OK | GNU C++ | TESTS | 40 | 296 | 8396800 | 3200 | |
| 26288976 | XuYipei | E | April 11, 2017, 3:44 a.m. | OK | GNU C++ | TESTS | 40 | 312 | 13414400 | 3200 | |
| 24111003 | NagiNikaido | E | Jan. 25, 2017, 12:26 p.m. | OK | GNU C++ | TESTS | 40 | 421 | 61952000 | 3200 | |
| 27214844 | jiyutian | E | May 19, 2017, 12:58 p.m. | OK | GNU C++ | TESTS | 40 | 639 | 6144000 | 3200 | |
| 24362094 | Scarlet_Climax | E | Feb. 2, 2017, 10:53 a.m. | OK | GNU C++ | TESTS | 40 | 748 | 117248000 | 3200 | |
| 39675486 | vjudge4 | E | June 26, 2018, 12:33 p.m. | OK | GNU C++ | TESTS | 40 | 779 | 7987200 | 3200 | |
| 24089369 | jcvb | E | Jan. 24, 2017, 10:29 a.m. | OK | GNU C++11 | TESTS | 40 | 124 | 46489600 | 3200 | |
| 24242688 | jiazihankk | E | Jan. 29, 2017, 8:47 a.m. | OK | GNU C++11 | TESTS | 40 | 295 | 10854400 | 3200 | |
| 33669364 | rxdoi | E | Dec. 27, 2017, 1:06 p.m. | OK | GNU C++11 | TESTS | 40 | 311 | 55296000 | 3200 | |
| 54881088 | _twilight | E | May 31, 2019, 2:21 p.m. | OK | GNU C++11 | TESTS | 40 | 342 | 8499200 | 3200 | |
| 24066245 | skywalkert | E | Jan. 23, 2017, 8:13 a.m. | OK | GNU C++11 | TESTS | 40 | 358 | 9113600 | 3200 | |
| 57771305 | py_ultron | E | July 26, 2019, 12:59 a.m. | OK | GNU C++11 | TESTS | 40 | 373 | 59904000 | 3200 | |
| 24554839 | krijgertje | E | Feb. 9, 2017, 5:32 p.m. | OK | GNU C++11 | TESTS | 40 | 374 | 12902400 | 3200 | |
| 35197929 | zhouyuyang | E | Feb. 13, 2018, 11:39 a.m. | OK | GNU C++11 | TESTS | 40 | 374 | 55296000 | 3200 | |
| 25138859 | shdut | E | March 2, 2017, 2:21 a.m. | OK | GNU C++11 | TESTS | 40 | 389 | 7168000 | 3200 | |
| 57877496 | lopare | E | July 28, 2019, 6:11 a.m. | OK | GNU C++11 | TESTS | 40 | 389 | 59904000 | 3200 | |
| 24660714 | NiroBC | E | Feb. 14, 2017, 9:37 a.m. | OK | GNU C++14 | TESTS | 40 | 234 | 7987200 | 3200 | |
| 40982737 | ReaLNero1 | E | July 30, 2018, 6:33 p.m. | OK | GNU C++14 | TESTS | 40 | 249 | 6041600 | 3200 | |
| 24852991 | bugmenot | E | Feb. 20, 2017, 7:24 p.m. | OK | GNU C++14 | TESTS | 40 | 358 | 7065600 | 3200 | |
| 26347099 | Ali.Pi | E | April 13, 2017, 8:34 p.m. | OK | GNU C++14 | TESTS | 40 | 374 | 9216000 | 3200 | |
| 68753379 | Cyanic | E | Jan. 14, 2020, 7:28 a.m. | OK | GNU C++14 | TESTS | 40 | 390 | 62464000 | 3200 | |
| 24050244 | Marcin_smu | E | Jan. 22, 2017, 7:54 p.m. | OK | GNU C++14 | TESTS | 40 | 405 | 12288000 | 3200 | |
| 24623164 | WuHongxun | E | Feb. 13, 2017, 7:31 a.m. | OK | GNU C++14 | TESTS | 40 | 436 | 9318400 | 3200 | |
| 24054125 | Marcin_smu | E | Jan. 22, 2017, 9:21 p.m. | OK | GNU C++14 | TESTS | 40 | 436 | 12595200 | 3200 | |
| 26524301 | fqw | E | April 20, 2017, 6:35 p.m. | OK | GNU C++14 | TESTS | 40 | 467 | 31641600 | 3200 | |
| 34622344 | -w- | E | Jan. 28, 2018, 3:20 a.m. | OK | GNU C++14 | TESTS | 40 | 467 | 64307200 | 3200 | |
| 69955235 | gongsuidashen | E | Feb. 1, 2020, 9:58 a.m. | OK | GNU C++17 | TESTS | 40 | 140 | 44339200 | 3200 | |
| 45250864 | Chameleon2460 | E | Nov. 3, 2018, 4:25 p.m. | OK | GNU C++17 | TESTS | 40 | 343 | 100044800 | 3200 | |
| 57299518 | Benq | E | July 18, 2019, 9:47 p.m. | OK | GNU C++17 | TESTS | 40 | 483 | 20684800 | 3200 | |
| 24137023 | mmaxio | E | Jan. 25, 2017, 8:11 p.m. | OK | Java 8 | TESTS | 40 | 592 | 24064000 | 3200 | |
| 24229904 | bmerry | E | Jan. 28, 2017, 4:17 p.m. | OK | Java 8 | TESTS | 40 | 842 | 42496000 | 3200 | |
| 24598837 | Neumann | E | Feb. 11, 2017, 11:44 p.m. | OK | Java 8 | TESTS | 40 | 857 | 389324800 | 3200 | |
| 24051985 | qwerty787788 | E | Jan. 22, 2017, 8:08 p.m. | OK | Java 8 | TESTS | 40 | 967 | 25395200 | 3200 |
Back to search problems