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 |
---|---|---|---|---|---|---|
621 | Codeforces Round 341 (Div. 2) | FINISHED | False | 7200 | 277574099 | Jan. 31, 2016, 2:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2871 ) | E | Wet Shark and Blocks | PROGRAMMING | dp matrices | 2100 |
B"There are b blocks of digits. Each one consisting of the same n digits, which are given to you in the input. Wet Shark must choose exactly one digit from each block and concatenate all of those digits together to form one large integer. For example, if he chooses digit 1 from the first block and digit 2 from the second block, he gets the integer 12. Wet Shark then takes this number modulo x. Please, tell him how many ways he can choose one digit from each block so that he gets exactly k as the final result. As this number may be too large, print it modulo 109 xe2 x80 x89+ xe2 x80 x897. Note, that the number of ways to choose some digit in the block is equal to the number of it's occurrences. For example, there are 3 ways to choose digit 5 from block 3 5 6 7 8 9 5 1 1 1 1 5. The first line of the input contains four space-separated integers, n, b, k and x (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8950 xe2 x80 x89000, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109, xe2 x80 x890 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89< xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100, xe2 x80 x89x xe2 x80 x89 xe2 x89 xa5 xe2 x80 x892) -- the number of digits in one block, the number of blocks, interesting remainder modulo x and modulo x itself. The next line contains n space separated integers ai (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x899), that give the digits contained in each block. Print the number of ways to pick exactly one digit from each blocks, such that the resulting integer equals k modulo x. In the second sample possible integers are 22, 26, 62 and 66. None of them gives the remainder 1 modulo 2. In the third sample integers 11, 13, 21, 23, 31 and 33 have remainder 1 modulo 2. There is exactly one way to obtain each of these integers, so the total answer is 6."... |
Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
15762873 | Fyodor | E | Feb. 3, 2016, 6:08 a.m. | OK | FPC | TESTS | 114 | 31 | 0 | 2100 | |
15718079 | XuDuSh | E | Jan. 31, 2016, 6:40 p.m. | OK | FPC | TESTS | 114 | 748 | 204800 | 2100 | |
15715373 | llgyc | E | Jan. 31, 2016, 5:03 p.m. | OK | FPC | TESTS | 114 | 780 | 102400 | 2100 | |
15719181 | Sanja | E | Jan. 31, 2016, 7:50 p.m. | OK | FPC | TESTS | 114 | 1092 | 7577600 | 2100 | |
15738837 | igdor99 | E | Feb. 1, 2016, 7:36 p.m. | OK | FPC | TESTS | 114 | 1138 | 307200 | 2100 | |
15791560 | quangminhhlrv | E | Feb. 4, 2016, 4:55 p.m. | OK | FPC | TESTS | 114 | 1153 | 307200 | 2100 | |
16205031 | dohonghuan | E | Feb. 19, 2016, 3:23 p.m. | OK | FPC | TESTS | 114 | 1669 | 5427200 | 2100 | |
15714346 | king_of_math | E | Jan. 31, 2016, 4:01 p.m. | OK | GNU C | TESTS | 114 | 265 | 102400 | 2100 | |
16253142 | vjudge3 | E | Feb. 21, 2016, 2:39 a.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
15970903 | namonakiaccount | E | Feb. 12, 2016, 12:51 p.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
15775239 | abeker | E | Feb. 3, 2016, 6:12 p.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
15774489 | yuan00 | E | Feb. 3, 2016, 5:31 p.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
16621788 | _Eren_ | E | March 9, 2016, 5:49 p.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
15773900 | yuan00 | E | Feb. 3, 2016, 4:58 p.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
15773570 | yuan00 | E | Feb. 3, 2016, 4:44 p.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
15754002 | FightGrovyle | E | Feb. 2, 2016, 4:18 p.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
15732168 | Kyle_Chi | E | Feb. 1, 2016, 1:43 p.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
15774286 | yuan00 | E | Feb. 3, 2016, 5:19 p.m. | OK | GNU C++ | TESTS | 114 | 31 | 0 | 2100 | |
58144921 | rainboy | E | Aug. 1, 2019, 8:22 p.m. | OK | GNU C11 | TESTS | 114 | 483 | 102400 | 2100 | |
16732459 | Vercingetorix | E | March 15, 2016, 6:15 p.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
27115881 | Good | E | May 15, 2017, 5:28 a.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
20676881 | Kerim.K | E | Sept. 17, 2016, 8:48 a.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
16229460 | PlayfulPanda | E | Feb. 20, 2016, 1:19 p.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
15925804 | chickenbear | E | Feb. 10, 2016, 7:43 a.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
15831413 | tumut | E | Feb. 5, 2016, 6:37 p.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
15773807 | renegade_warrior | E | Feb. 3, 2016, 4:54 p.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
15761886 | sagarkaniche | E | Feb. 3, 2016, 4:08 a.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
15759690 | First4196 | E | Feb. 2, 2016, 11:26 p.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
15750679 | etflly | E | Feb. 2, 2016, 1:15 p.m. | OK | GNU C++11 | TESTS | 114 | 31 | 0 | 2100 | |
39231313 | Marckess | E | June 14, 2018, 4:24 a.m. | OK | GNU C++14 | TESTS | 114 | 31 | 0 | 2100 | |
30268897 | NiroBC | E | Sept. 11, 2017, 3:26 p.m. | OK | GNU C++14 | TESTS | 114 | 31 | 102400 | 2100 | |
32955611 | nima10khodaveisi | E | Dec. 5, 2017, 6:29 p.m. | OK | GNU C++14 | TESTS | 114 | 31 | 1843200 | 2100 | |
34222532 | gaurav15 | E | Jan. 16, 2018, 1:08 p.m. | OK | GNU C++14 | TESTS | 114 | 31 | 1945600 | 2100 | |
34222285 | gaurav15 | E | Jan. 16, 2018, 12:59 p.m. | OK | GNU C++14 | TESTS | 114 | 31 | 1945600 | 2100 | |
28188028 | Shuvro77 | E | July 1, 2017, 9 a.m. | OK | GNU C++14 | TESTS | 114 | 31 | 1945600 | 2100 | |
28073800 | szawinis | E | June 27, 2017, 9:49 a.m. | OK | GNU C++14 | TESTS | 114 | 31 | 1945600 | 2100 | |
34222606 | gaurav15 | E | Jan. 16, 2018, 1:11 p.m. | OK | GNU C++14 | TESTS | 114 | 31 | 1945600 | 2100 | |
26118201 | GoogleBot | E | April 4, 2017, 9:35 a.m. | OK | GNU C++14 | TESTS | 114 | 31 | 1945600 | 2100 | |
38606779 | n_dao107 | E | May 25, 2018, 11:04 a.m. | OK | GNU C++14 | TESTS | 114 | 46 | 0 | 2100 | |
57497470 | hkyiitd | E | July 22, 2019, 9 a.m. | OK | GNU C++17 | TESTS | 114 | 46 | 0 | 2100 | |
47069032 | crathva | E | Dec. 15, 2018, 4:13 p.m. | OK | GNU C++17 | TESTS | 114 | 46 | 0 | 2100 | |
69399462 | ruo | E | Jan. 23, 2020, 7:50 a.m. | OK | GNU C++17 | TESTS | 114 | 46 | 102400 | 2100 | |
38978265 | aviroop123 | E | June 5, 2018, 7:58 p.m. | OK | GNU C++17 | TESTS | 114 | 46 | 3379200 | 2100 | |
38978166 | aviroop123 | E | June 5, 2018, 7:50 p.m. | OK | GNU C++17 | TESTS | 114 | 46 | 3379200 | 2100 | |
52510596 | KevinWan | E | April 8, 2019, 10:28 p.m. | OK | GNU C++17 | TESTS | 114 | 61 | 204800 | 2100 | |
52538586 | YouKn0wWho | E | April 9, 2019, 4:53 p.m. | OK | GNU C++17 | TESTS | 114 | 62 | 0 | 2100 | |
58165989 | tranquanghuy | E | Aug. 2, 2019, 9:04 a.m. | OK | GNU C++17 | TESTS | 114 | 62 | 102400 | 2100 | |
40550542 | Martin53 | E | July 19, 2018, 2:10 p.m. | OK | GNU C++17 | TESTS | 114 | 62 | 102400 | 2100 | |
47360836 | kush_s | E | Dec. 22, 2018, 8:38 a.m. | OK | GNU C++17 | TESTS | 114 | 62 | 204800 | 2100 | |
15724829 | DukeOfYork | E | Feb. 1, 2016, 5:16 a.m. | OK | Java 7 | TESTS | 114 | 124 | 0 | 2100 | |
15723049 | mkirsche | E | Feb. 1, 2016, 2:29 a.m. | OK | Java 7 | TESTS | 114 | 889 | 0 | 2100 | |
18947435 | MedoN11 | E | July 7, 2016, 9 a.m. | OK | Java 7 | TESTS | 114 | 1060 | 9932800 | 2100 | |
15714589 | paresh | E | Jan. 31, 2016, 4:03 p.m. | OK | Java 7 | TESTS | 114 | 1169 | 0 | 2100 | |
15736781 | alibaba | E | Feb. 1, 2016, 5:29 p.m. | OK | Java 7 | TESTS | 114 | 1575 | 0 | 2100 | |
16298578 | MatthewRaker | E | Feb. 23, 2016, 7:15 p.m. | OK | Java 8 | TESTS | 114 | 140 | 0 | 2100 | |
15718345 | Guliash | E | Jan. 31, 2016, 6:56 p.m. | OK | Java 8 | TESTS | 114 | 140 | 0 | 2100 | |
15717757 | Tifuera | E | Jan. 31, 2016, 6:20 p.m. | OK | Java 8 | TESTS | 114 | 140 | 0 | 2100 | |
15717995 | Tifuera | E | Jan. 31, 2016, 6:35 p.m. | OK | Java 8 | TESTS | 114 | 170 | 0 | 2100 | |
15717859 | Tifuera | E | Jan. 31, 2016, 6:27 p.m. | OK | Java 8 | TESTS | 114 | 171 | 0 | 2100 | |
23890496 | jin03002 | E | Jan. 16, 2017, 8:40 p.m. | OK | Java 8 | TESTS | 114 | 187 | 20582400 | 2100 | |
55242489 | Sharon | E | June 7, 2019, 11:50 a.m. | OK | Java 8 | TESTS | 114 | 202 | 0 | 2100 | |
15733092 | dhrumil140396 | E | Feb. 1, 2016, 2:26 p.m. | OK | Java 8 | TESTS | 114 | 280 | 0 | 2100 | |
21210104 | motivation_error | E | Oct. 5, 2016, 1:47 p.m. | OK | Java 8 | TESTS | 114 | 342 | 0 | 2100 | |
21209990 | motivation_error | E | Oct. 5, 2016, 1:44 p.m. | OK | Java 8 | TESTS | 114 | 343 | 0 | 2100 | |
15744005 | og.kostya | E | Feb. 2, 2016, 5:30 a.m. | OK | MS C# | TESTS | 114 | 62 | 204800 | 2100 | |
15743941 | og.kostya | E | Feb. 2, 2016, 5:23 a.m. | OK | MS C# | TESTS | 114 | 62 | 204800 | 2100 | |
15736638 | og.kostya | E | Feb. 1, 2016, 5:22 p.m. | OK | MS C# | TESTS | 114 | 62 | 204800 | 2100 | |
15727893 | AnatolyTolstobrov | E | Feb. 1, 2016, 9:06 a.m. | OK | MS C# | TESTS | 114 | 62 | 204800 | 2100 | |
15727793 | AnatolyTolstobrov | E | Feb. 1, 2016, 8:59 a.m. | OK | MS C# | TESTS | 114 | 62 | 409600 | 2100 | |
15717335 | og.kostya | E | Jan. 31, 2016, 5:59 p.m. | OK | MS C# | TESTS | 114 | 795 | 3072000 | 2100 | |
15715829 | camypaper | E | Jan. 31, 2016, 5:08 p.m. | OK | MS C# | TESTS | 114 | 842 | 3174400 | 2100 | |
15752222 | azukun | E | Feb. 2, 2016, 2:35 p.m. | OK | MS C# | TESTS | 114 | 889 | 10547200 | 2100 | |
15979194 | AnnKats93 | E | Feb. 12, 2016, 10:31 p.m. | OK | MS C++ | TESTS | 114 | 31 | 102400 | 2100 | |
15786522 | Naduxa | E | Feb. 4, 2016, 11:54 a.m. | OK | MS C++ | TESTS | 114 | 31 | 102400 | 2100 | |
15742644 | iblacksun | E | Feb. 2, 2016, 2:47 a.m. | OK | MS C++ | TESTS | 114 | 31 | 204800 | 2100 | |
15722987 | iblacksun | E | Feb. 1, 2016, 2:23 a.m. | OK | MS C++ | TESTS | 114 | 31 | 204800 | 2100 | |
15762558 | arkahjp | E | Feb. 3, 2016, 5:30 a.m. | OK | MS C++ | TESTS | 114 | 46 | 0 | 2100 | |
15762467 | arkahjp | E | Feb. 3, 2016, 5:20 a.m. | OK | MS C++ | TESTS | 114 | 46 | 0 | 2100 | |
15759858 | Radi4 | E | Feb. 2, 2016, 11:48 p.m. | OK | MS C++ | TESTS | 114 | 46 | 0 | 2100 | |
15716528 | I.Smirn0ff | E | Jan. 31, 2016, 5:24 p.m. | OK | MS C++ | TESTS | 114 | 46 | 0 | 2100 | |
15716388 | I.Smirn0ff | E | Jan. 31, 2016, 5:19 p.m. | OK | MS C++ | TESTS | 114 | 46 | 0 | 2100 | |
36388915 | vjudge4 | E | March 18, 2018, 12:52 p.m. | OK | MS C++ | TESTS | 114 | 62 | 13619200 | 2100 | |
58323789 | vjudge4 | E | Aug. 5, 2019, 6:58 a.m. | OK | MS C++ 2017 | TESTS | 114 | 826 | 1228800 | 2100 | |
15724988 | poikniok | E | Feb. 1, 2016, 5:30 a.m. | OK | PyPy 2 | TESTS | 114 | 436 | 7065600 | 2100 | |
15724891 | poikniok | E | Feb. 1, 2016, 5:22 a.m. | OK | PyPy 2 | TESTS | 114 | 436 | 7168000 | 2100 | |
15726802 | 00h00h00h | E | Feb. 1, 2016, 7:48 a.m. | OK | PyPy 2 | TESTS | 114 | 483 | 8704000 | 2100 | |
35896129 | ______u______ | E | March 3, 2018, 5:02 p.m. | OK | PyPy 2 | TESTS | 114 | 499 | 29184000 | 2100 | |
35888002 | ______k______ | E | March 3, 2018, 2:14 p.m. | OK | PyPy 2 | TESTS | 114 | 499 | 29184000 | 2100 | |
35887035 | ______i______ | E | March 3, 2018, 1:57 p.m. | OK | PyPy 2 | TESTS | 114 | 499 | 29184000 | 2100 | |
35885076 | ______M______ | E | March 3, 2018, 1:21 p.m. | OK | PyPy 2 | TESTS | 114 | 499 | 29184000 | 2100 | |
15725149 | poikniok | E | Feb. 1, 2016, 5:44 a.m. | OK | PyPy 2 | TESTS | 114 | 514 | 8806400 | 2100 | |
15725555 | poikniok | E | Feb. 1, 2016, 6:16 a.m. | OK | PyPy 2 | TESTS | 114 | 514 | 8908800 | 2100 | |
15725476 | poikniok | E | Feb. 1, 2016, 6:11 a.m. | OK | PyPy 2 | TESTS | 114 | 514 | 8908800 | 2100 | |
31962479 | yugle7 | E | Nov. 1, 2017, 8:26 p.m. | OK | PyPy 3 | TESTS | 114 | 171 | 4915200 | 2100 | |
15725879 | 00h00h00h | E | Feb. 1, 2016, 6:40 a.m. | OK | PyPy 3 | TESTS | 114 | 576 | 7372800 | 2100 | |
15725907 | 00h00h00h | E | Feb. 1, 2016, 6:42 a.m. | OK | PyPy 3 | TESTS | 114 | 624 | 7372800 | 2100 | |
15725661 | poikniok | E | Feb. 1, 2016, 6:23 a.m. | OK | PyPy 3 | TESTS | 114 | 639 | 7577600 | 2100 | |
15725342 | 00h00h00h | E | Feb. 1, 2016, 6 a.m. | OK | Python 2 | TESTS | 114 | 1060 | 1228800 | 2100 | |
15725388 | 00h00h00h | E | Feb. 1, 2016, 6:03 a.m. | OK | Python 2 | TESTS | 114 | 1091 | 1228800 | 2100 | |
15725196 | 00h00h00h | E | Feb. 1, 2016, 5:49 a.m. | OK | Python 2 | TESTS | 114 | 1153 | 1228800 | 2100 | |
36200624 | petiteteaparty | E | March 11, 2018, 1:11 p.m. | OK | Python 3 | TESTS | 114 | 233 | 6451200 | 2100 | |
31962655 | yugle7 | E | Nov. 1, 2017, 8:34 p.m. | OK | Python 3 | TESTS | 114 | 249 | 716800 | 2100 | |
15715398 | cugel | E | Jan. 31, 2016, 5:03 p.m. | OK | Python 3 | TESTS | 114 | 343 | 1024000 | 2100 | |
34807068 | cjjst123 | E | Feb. 1, 2018, 3:05 p.m. | OK | Python 3 | TESTS | 114 | 545 | 6553600 | 2100 |
Back to search problems