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 |
---|---|---|---|---|---|---|
510 | Codeforces Round 290 (Div. 2) | FINISHED | False | 7500 | 314544587 | Feb. 2, 2015, 4:30 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 5758 ) | D | Fox And Jumping | PROGRAMMING | bitmasks brute force dp math | 2100 |
B"Fox Ciel is playing a game. In this game there is an infinite long tape with cells indexed by integers (positive, negative and zero). At the beginning she is standing at the cell 0. There are also n cards, each card has 2 attributes: length li and cost ci. If she pays ci dollars then she can apply i-th card. After applying i-th card she becomes able to make jumps of length li, i. e. from cell x to cell (x xe2 x80 x89- xe2 x80 x89li) or cell (x xe2 x80 x89+ xe2 x80 x89li). She wants to be able to jump to any cell on the tape (possibly, visiting some intermediate cells). For achieving this goal, she wants to buy some cards, paying as little money as possible. If this is possible, calculate the minimal cost. The first line contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89300), number of cards. The second line contains n numbers li (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89li xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109), the jump lengths of cards. The third line contains n numbers ci (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105), the costs of cards. If it is impossible to buy some cards and become able to jump to any cell, output -1. Otherwise output the minimal cost of buying such set of cards. In first sample test, buying one card is not enough: for example, if you buy a card with length 100, you can't jump to any cell whose index is not a multiple of 100. The best way is to buy first and second card, that will make you be able to jump to any cell. In the second sample test, even if you buy all cards, you can't jump to any cell whose index is not a multiple of 10, so you should output -1."... |
Codeforces Round #290 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
27747436 | vjudge4 | D | June 13, 2017, 2:29 a.m. | OK | FPC | TESTS | 65 | 62 | 0 | 2100 | |
27747382 | vjudge5 | D | June 13, 2017, 2:22 a.m. | OK | FPC | TESTS | 65 | 77 | 0 | 2100 | |
27751135 | vjudge2 | D | June 13, 2017, 7:47 a.m. | OK | FPC | TESTS | 65 | 78 | 0 | 2100 | |
27748138 | vjudge4 | D | June 13, 2017, 3:42 a.m. | OK | GNU C++ | TESTS | 65 | 15 | 0 | 2100 | |
19669476 | zyding | D | Aug. 6, 2016, 12:10 p.m. | OK | GNU C++ | TESTS | 65 | 15 | 2150400 | 2100 | |
21509366 | TheLeader | D | Oct. 17, 2016, 1:31 a.m. | OK | GNU C++ | TESTS | 65 | 15 | 3072000 | 2100 | |
27750820 | vjudge5 | D | June 13, 2017, 7:23 a.m. | OK | GNU C++ | TESTS | 65 | 30 | 0 | 2100 | |
19050123 | aufeas | D | July 12, 2016, 11:55 a.m. | OK | GNU C++ | TESTS | 65 | 31 | 0 | 2100 | |
41327949 | CHENRUIJIE | D | Aug. 8, 2018, 6:55 a.m. | OK | GNU C++ | TESTS | 65 | 31 | 307200 | 2100 | |
18823874 | S.G.G | D | June 30, 2016, 12:53 p.m. | OK | GNU C++ | TESTS | 65 | 31 | 614400 | 2100 | |
18823813 | S.G.G | D | June 30, 2016, 12:49 p.m. | OK | GNU C++ | TESTS | 65 | 31 | 1228800 | 2100 | |
40987362 | ReaLNero1 | D | July 30, 2018, 9:12 p.m. | OK | GNU C++ | TESTS | 65 | 31 | 8089600 | 2100 | |
20835793 | uma2609 | D | Sept. 23, 2016, 11:28 a.m. | OK | GNU C++ | TESTS | 65 | 46 | 0 | 2100 | |
27766334 | The_Unbeatable | D | June 14, 2017, 2:51 a.m. | OK | GNU C++11 | TESTS | 65 | 30 | 0 | 2100 | |
19412490 | Seku | D | July 26, 2016, 1:35 a.m. | OK | GNU C++11 | TESTS | 65 | 30 | 1024000 | 2100 | |
35327409 | AlanWaP | D | Feb. 16, 2018, 5:34 a.m. | OK | GNU C++11 | TESTS | 65 | 30 | 2150400 | 2100 | |
57188480 | CaprYang | D | July 17, 2019, 9:32 a.m. | OK | GNU C++11 | TESTS | 65 | 31 | 0 | 2100 | |
57188413 | CaprYang | D | July 17, 2019, 9:31 a.m. | OK | GNU C++11 | TESTS | 65 | 31 | 0 | 2100 | |
56473166 | Lokeo | D | July 3, 2019, 12:03 p.m. | OK | GNU C++11 | TESTS | 65 | 31 | 0 | 2100 | |
52513588 | HTRK | D | April 9, 2019, 2:45 a.m. | OK | GNU C++11 | TESTS | 65 | 31 | 0 | 2100 | |
52499406 | E-lie | D | April 8, 2019, 3:18 p.m. | OK | GNU C++11 | TESTS | 65 | 31 | 0 | 2100 | |
47809505 | ylxmf2005awa | D | Jan. 1, 2019, 10:10 a.m. | OK | GNU C++11 | TESTS | 65 | 31 | 0 | 2100 | |
41329673 | JinTianHao | D | Aug. 8, 2018, 7:59 a.m. | OK | GNU C++11 | TESTS | 65 | 31 | 0 | 2100 | |
23033226 | bird_14 | D | Dec. 16, 2016, 3:45 p.m. | OK | GNU C++14 | TESTS | 65 | 15 | 307200 | 2100 | |
33084927 | Light | D | Dec. 10, 2017, 7:36 p.m. | OK | GNU C++14 | TESTS | 65 | 15 | 2867200 | 2100 | |
29540005 | heisenberg13 | D | Aug. 17, 2017, 10:10 p.m. | OK | GNU C++14 | TESTS | 65 | 31 | 102400 | 2100 | |
52480310 | nong | D | April 8, 2019, 4:49 a.m. | OK | GNU C++14 | TESTS | 65 | 31 | 204800 | 2100 | |
41323535 | eddysboy | D | Aug. 8, 2018, 3:10 a.m. | OK | GNU C++14 | TESTS | 65 | 31 | 204800 | 2100 | |
41308713 | Myrcella | D | Aug. 7, 2018, 2:34 p.m. | OK | GNU C++14 | TESTS | 65 | 31 | 204800 | 2100 | |
69172034 | Theofratus | D | Jan. 20, 2020, 6:33 a.m. | OK | GNU C++14 | TESTS | 65 | 31 | 409600 | 2100 | |
47528826 | _Kkura_ | D | Dec. 26, 2018, 5:33 p.m. | OK | GNU C++14 | TESTS | 65 | 31 | 512000 | 2100 | |
41393983 | paris2007 | D | Aug. 9, 2018, 9:55 a.m. | OK | GNU C++14 | TESTS | 65 | 31 | 512000 | 2100 | |
58852547 | HumHumMonster | D | Aug. 15, 2019, 8:04 a.m. | OK | GNU C++14 | TESTS | 65 | 31 | 1228800 | 2100 | |
35169752 | AsahiKasugano | D | Feb. 12, 2018, 6:01 a.m. | OK | GNU C++17 | TESTS | 65 | 30 | 2355200 | 2100 | |
47339864 | head_shot | D | Dec. 21, 2018, 4:51 p.m. | OK | GNU C++17 | TESTS | 65 | 31 | 204800 | 2100 | |
41305744 | vjudge4 | D | Aug. 7, 2018, 12:57 p.m. | OK | GNU C++17 | TESTS | 65 | 31 | 204800 | 2100 | |
41305679 | somebody_else | D | Aug. 7, 2018, 12:55 p.m. | OK | GNU C++17 | TESTS | 65 | 31 | 204800 | 2100 | |
49679019 | Stroustrup | D | Feb. 9, 2019, 10:23 p.m. | OK | GNU C++17 | TESTS | 65 | 31 | 512000 | 2100 | |
62367469 | aryanv | D | Oct. 11, 2019, 2:17 p.m. | OK | GNU C++17 | TESTS | 65 | 31 | 2457600 | 2100 | |
69488588 | codekode | D | Jan. 24, 2020, 8:55 p.m. | OK | GNU C++17 | TESTS | 65 | 46 | 0 | 2100 | |
63016736 | zahra..d | D | Oct. 20, 2019, 1:08 p.m. | OK | GNU C++17 | TESTS | 65 | 46 | 0 | 2100 | |
58206215 | TianJianXing | D | Aug. 3, 2019, 7:03 a.m. | OK | GNU C++17 | TESTS | 65 | 46 | 0 | 2100 | |
44737141 | Badral | D | Oct. 23, 2018, 1:15 p.m. | OK | GNU C++17 | TESTS | 65 | 46 | 0 | 2100 | |
61075240 | ISSAM_LAKOUAM | D | Sept. 22, 2019, 2:11 p.m. | OK | Java 8 | TESTS | 65 | 140 | 0 | 2100 | |
54569484 | jenish9599 | D | May 24, 2019, 6:24 p.m. | OK | Java 8 | TESTS | 65 | 171 | 0 | 2100 | |
44979112 | hongquanntct | D | Oct. 28, 2018, 7:40 a.m. | OK | Java 8 | TESTS | 65 | 171 | 0 | 2100 | |
20569029 | omarfarhat97 | D | Sept. 13, 2016, 2:23 p.m. | OK | Java 8 | TESTS | 65 | 186 | 0 | 2100 | |
37898754 | DevilJin | D | May 5, 2018, 7:28 a.m. | OK | Java 8 | TESTS | 65 | 187 | 21196800 | 2100 | |
31880638 | flyman3046 | D | Oct. 30, 2017, 3:39 a.m. | OK | Java 8 | TESTS | 65 | 202 | 0 | 2100 | |
45407960 | Srinivasa_Ramanujan | D | Nov. 7, 2018, 10:37 a.m. | OK | Java 8 | TESTS | 65 | 217 | 0 | 2100 | |
44821033 | vjudge3 | D | Oct. 25, 2018, 2:22 a.m. | OK | Java 8 | TESTS | 65 | 233 | 0 | 2100 | |
26691371 | pitfall | D | April 26, 2017, 8:54 p.m. | OK | Java 8 | TESTS | 65 | 233 | 20582400 | 2100 | |
27233792 | Maulik_Patel | D | May 20, 2017, 10:44 a.m. | OK | Java 8 | TESTS | 65 | 234 | 0 | 2100 | |
69085945 | vjudge5 | D | Jan. 19, 2020, 8:17 a.m. | OK | MS C++ | TESTS | 65 | 62 | 921600 | 2100 | |
69080500 | vjudge5 | D | Jan. 19, 2020, 6:10 a.m. | OK | MS C++ | TESTS | 65 | 109 | 204800 | 2100 | |
68644916 | vjudge1 | D | Jan. 12, 2020, 8:44 a.m. | OK | MS C++ | TESTS | 65 | 109 | 204800 | 2100 | |
60829763 | vjudge2 | D | Sept. 19, 2019, 6:22 a.m. | OK | MS C++ | TESTS | 65 | 109 | 204800 | 2100 | |
51673920 | vjudge1 | D | March 22, 2019, 9:29 a.m. | OK | MS C++ | TESTS | 65 | 109 | 204800 | 2100 | |
58340169 | TianZuiXing | D | Aug. 5, 2019, 12:56 p.m. | OK | MS C++ | TESTS | 65 | 124 | 204800 | 2100 | |
58132138 | vjudge3 | D | Aug. 1, 2019, 2:40 p.m. | OK | MS C++ | TESTS | 65 | 124 | 204800 | 2100 | |
47667975 | vjudge2 | D | Dec. 29, 2018, 3:02 a.m. | OK | MS C++ | TESTS | 65 | 124 | 204800 | 2100 | |
47667966 | vjudge4 | D | Dec. 29, 2018, 3:01 a.m. | OK | MS C++ | TESTS | 65 | 124 | 204800 | 2100 | |
47621809 | vjudge1 | D | Dec. 28, 2018, 1:09 p.m. | OK | MS C++ | TESTS | 65 | 124 | 204800 | 2100 | |
58338420 | TianZuiXing | D | Aug. 5, 2019, 12:21 p.m. | OK | MS C++ 2017 | TESTS | 65 | 93 | 204800 | 2100 | |
69084143 | vjudge2 | D | Jan. 19, 2020, 7:38 a.m. | OK | MS C++ 2017 | TESTS | 65 | 186 | 1024000 | 2100 | |
54072459 | CtrlAlt | D | May 13, 2019, 5:12 p.m. | OK | MS C++ 2017 | TESTS | 65 | 1606 | 307200 | 2100 | |
54073510 | gatsko | D | May 13, 2019, 5:59 p.m. | OK | PyPy 2 | TESTS | 65 | 327 | 7680000 | 2100 | |
43612260 | Onesh0t | D | Sept. 30, 2018, 2:41 p.m. | OK | PyPy 2 | TESTS | 65 | 327 | 7782400 | 2100 | |
35884583 | ______u______ | D | March 3, 2018, 1:15 p.m. | OK | Python 2 | TESTS | 65 | 1153 | 4812800 | 2100 | |
35884290 | ______n______ | D | March 3, 2018, 1:09 p.m. | OK | Python 2 | TESTS | 65 | 1153 | 4812800 | 2100 | |
35883566 | _____k_____ | D | March 3, 2018, 12:56 p.m. | OK | Python 2 | TESTS | 65 | 1153 | 4812800 | 2100 | |
35883188 | _____i_____ | D | March 3, 2018, 12:50 p.m. | OK | Python 2 | TESTS | 65 | 1153 | 4812800 | 2100 | |
35872776 | ______h______ | D | March 3, 2018, 7:16 a.m. | OK | Python 2 | TESTS | 65 | 1153 | 4812800 | 2100 | |
35872597 | ______k______ | D | March 3, 2018, 7:14 a.m. | OK | Python 2 | TESTS | 65 | 1153 | 4812800 | 2100 | |
35872113 | ______i______ | D | March 3, 2018, 7:04 a.m. | OK | Python 2 | TESTS | 65 | 1153 | 4812800 | 2100 | |
35870210 | ______M______ | D | March 3, 2018, 6:22 a.m. | OK | Python 2 | TESTS | 65 | 1153 | 4812800 | 2100 |
Back to search problems