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 |
---|---|---|---|---|---|---|
1030 | Technocup 2019 - Elimination Round 1 | FINISHED | False | 7200 | 194115299 | Sept. 23, 2018, 1:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 361 ) | G | Linear Congruential Generator | PROGRAMMING | number theory | 3000 |
B'You are given a tuple generator f^{(k)} = (f_1^{(k)}, f_2^{(k)}, ... , f_n^{(k)}) , where f_i^{(k)} = (a_i cdot f_i^{(k - 1)} + b_i) bmod p_i and f^{(0)} = (x_1, x_2, ... , x_n) . Here x bmod y denotes the remainder of x when divided by y . All p_i are primes. One can see that with fixed sequences x_i , y_i , a_i the tuples f^{(k)} starting from some index will repeat tuples with smaller indices. Calculate the maximum number of different tuples (from all f^{(k)} for k ge 0 ) that can be produced by this generator, if x_i , a_i , b_i are integers in the range [0, p_i - 1] and can be chosen arbitrary. The answer can be large, so print the remainder it gives when divided by 10^9 + 7 The first line contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of elements in the tuple. The second line contains n space separated prime numbers -- the modules p_1, p_2, ldots, p_n ( 2 <= p_i <= 2 cdot 10^6 ). Print one integer -- the maximum number of different tuples modulo 10^9 + 7 . In the first example we can choose next parameters: a = [1, 1, 1, 1] , b = [1, 1, 1, 1] , x = [0, 0, 0, 0] , then f_i^{(k)} = k bmod p_i . In the second example we can choose next parameters: a = [1, 1, 2] , b = [1, 1, 0] , x = [0, 0, 1] . '... |
Сodeforces Round 512 (and Technocup — Elimination Round 1) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
43680536 | pekempey | G | Oct. 2, 2018, 9:55 a.m. | OK | GNU C11 | TESTS | 59 | 124 | 25702400 | 3000 | |
46565761 | Althen | G | Dec. 3, 2018, 10:52 p.m. | OK | GNU C++11 | TESTS | 59 | 62 | 42086400 | 3000 | |
46544683 | Althen | G | Dec. 3, 2018, 1:55 p.m. | OK | GNU C++11 | TESTS | 59 | 62 | 42086400 | 3000 | |
46630388 | luogu_bot3 | G | Dec. 5, 2018, 2:23 a.m. | OK | GNU C++11 | TESTS | 59 | 62 | 42086400 | 3000 | |
46544299 | luogu_bot1 | G | Dec. 3, 2018, 1:44 p.m. | OK | GNU C++11 | TESTS | 59 | 77 | 42086400 | 3000 | |
48012068 | skywalkert | G | Jan. 5, 2019, 8:10 p.m. | OK | GNU C++11 | TESTS | 59 | 78 | 32870400 | 3000 | |
46544555 | Althen | G | Dec. 3, 2018, 1:51 p.m. | OK | GNU C++11 | TESTS | 59 | 78 | 42086400 | 3000 | |
46544239 | luogu_bot4 | G | Dec. 3, 2018, 1:43 p.m. | OK | GNU C++11 | TESTS | 59 | 78 | 42086400 | 3000 | |
46544593 | Althen | G | Dec. 3, 2018, 1:52 p.m. | OK | GNU C++11 | TESTS | 59 | 78 | 42086400 | 3000 | |
43492223 | luogu_bot3 | G | Sept. 27, 2018, 1:07 p.m. | OK | GNU C++11 | TESTS | 59 | 93 | 41881600 | 3000 | |
43518008 | dawnstars | G | Sept. 28, 2018, 6:24 a.m. | OK | GNU C++11 | TESTS | 59 | 93 | 42188800 | 3000 | |
44620406 | Shayan.P | G | Oct. 21, 2018, 5:57 a.m. | OK | GNU C++14 | TESTS | 59 | 124 | 25088000 | 3000 | |
43496316 | tmwilliamlin168 | G | Sept. 27, 2018, 2:51 p.m. | OK | GNU C++14 | TESTS | 59 | 124 | 26624000 | 3000 | |
46043156 | I_love_chickpea | G | Nov. 21, 2018, 9:48 p.m. | OK | GNU C++14 | TESTS | 59 | 124 | 33689600 | 3000 | |
43566847 | MeePwn | G | Sept. 29, 2018, 11:23 a.m. | OK | GNU C++14 | TESTS | 59 | 124 | 42086400 | 3000 | |
44000254 | Anai | G | Oct. 8, 2018, 1:24 p.m. | OK | GNU C++14 | TESTS | 59 | 171 | 15667200 | 3000 | |
43430438 | Jayce132 | G | Sept. 26, 2018, 12:38 a.m. | OK | GNU C++14 | TESTS | 59 | 171 | 56115200 | 3000 | |
43449630 | Anachor | G | Sept. 26, 2018, 12:48 p.m. | OK | GNU C++14 | TESTS | 59 | 218 | 19763200 | 3000 | |
43337718 | neal | G | Sept. 23, 2018, 4:40 p.m. | OK | GNU C++14 | TESTS | 59 | 218 | 29696000 | 3000 | |
43449536 | Anachor | G | Sept. 26, 2018, 12:46 p.m. | OK | GNU C++14 | TESTS | 59 | 265 | 18739200 | 3000 | |
43450018 | Anachor | G | Sept. 26, 2018, 12:56 p.m. | OK | GNU C++14 | TESTS | 59 | 280 | 18739200 | 3000 | |
44751743 | ReaLNero1 | G | Oct. 23, 2018, 8:19 p.m. | OK | GNU C++17 | TESTS | 59 | 78 | 48640000 | 3000 | |
45178024 | Kiki.Do.You.Love.Me | G | Nov. 1, 2018, 3:43 p.m. | OK | GNU C++17 | TESTS | 59 | 78 | 48640000 | 3000 | |
65222367 | kefaa2 | G | Nov. 16, 2019, 9:51 p.m. | OK | GNU C++17 | TESTS | 59 | 124 | 33689600 | 3000 | |
43340873 | catlak_profesor_mfb | G | Sept. 23, 2018, 5:41 p.m. | OK | GNU C++17 | TESTS | 59 | 140 | 33177600 | 3000 | |
54871211 | HirasawaaYui | G | May 31, 2019, 9:21 a.m. | OK | GNU C++17 | TESTS | 59 | 140 | 41676800 | 3000 | |
52627015 | Isonan | G | April 12, 2019, 4:23 a.m. | OK | GNU C++17 | TESTS | 59 | 202 | 26009600 | 3000 | |
60435425 | JonasAAA | G | Sept. 12, 2019, 10:40 a.m. | OK | GNU C++17 | TESTS | 59 | 265 | 14950400 | 3000 | |
43350231 | yujinwunz | G | Sept. 24, 2018, 1:28 a.m. | OK | GNU C++17 | TESTS | 59 | 342 | 52121600 | 3000 | |
57279875 | .I. | G | July 18, 2019, 12:20 p.m. | OK | GNU C++17 | TESTS | 59 | 420 | 33587200 | 3000 | |
61924516 | professorik | G | Oct. 5, 2019, 2:11 p.m. | OK | GNU C++17 | TESTS | 59 | 545 | 120524800 | 3000 |
Back to search problems