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 |
---|---|---|---|---|---|---|
1045 | Bubble Cup 11 - Finals [Online Mirror, Div. 1] | FINISHED | False | 18000 | 199567463 | Sept. 22, 2018, 10:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 525 ) | B | Space Isaac | PROGRAMMING | hashing number theory | 2500 |
B'Everybody seems to think that the Martians are green, but it turns out they are metallic pink and fat. Ajs has two bags of distinct nonnegative integers. The bags are disjoint, and the union of the sets of numbers in the bags is {0,1, xe2 x80 xa6,M-1 } , for some positive integer M . Ajs draws a number from the first bag and a number from the second bag, and then sums them modulo M . What are the residues modulo M that Ajs cannot obtain with this action? The first line contains two positive integer N ( 1 <= q N <= q 200 ,000 ) and M ( N+1 <= q M <= q 10^{9} ), denoting the number of the elements in the first bag and the modulus, respectively. The second line contains N nonnegative integers a_1,a_2, ldots,a_N ( 0 <= q a_1<a_2< ldots< a_N<M ), the contents of the first bag. In the first line, output the cardinality K of the set of residues modulo M which Ajs cannot obtain. In the second line of the output, print K space-separated integers greater or equal than zero and less than M , which represent the residues Ajs cannot obtain. The outputs should be sorted in increasing order of magnitude. If K =0, do not output the second line. In the first sample, the first bag and the second bag contain {3,4 } and {0,1,2 } , respectively. Ajs can obtain every residue modulo 5 except the residue 2 : 4+1 equiv 0, , 4+2 equiv 1, , 3+0 equiv 3, , 3+1 equiv 4 modulo 5 . One can check that there is no choice of elements from the first and the second bag which sum to 2 modulo 5 . In the second sample, the contents of the first bag are {5,25,125,625 } , while the second bag contains all other nonnegative integers with at most 9 decimal digits. Every residue modulo 1 ,000 ,000 ,000 can be obtained as a sum of an element in the first bag and an element in the second bag. '... |
E |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
44004079 | FlashHu | B | Oct. 8, 2018, 3:03 p.m. | OK | GNU C++11 | TESTS | 29 | 31 | 4198400 | 2500 | |
57942186 | luogu_bot4 | B | July 29, 2019, 12:58 p.m. | OK | GNU C++11 | TESTS | 29 | 31 | 7372800 | 2500 | |
44004110 | FlashHu | B | Oct. 8, 2018, 3:04 p.m. | OK | GNU C++11 | TESTS | 29 | 46 | 4198400 | 2500 | |
43981378 | zusuyu | B | Oct. 8, 2018, 3:22 a.m. | OK | GNU C++11 | TESTS | 29 | 46 | 6246400 | 2500 | |
44735162 | luogu_bot5 | B | Oct. 23, 2018, 12:31 p.m. | OK | GNU C++11 | TESTS | 29 | 46 | 7270400 | 2500 | |
46752619 | zjhqg2005 | B | Dec. 8, 2018, 9:58 a.m. | OK | GNU C++11 | TESTS | 29 | 46 | 7372800 | 2500 | |
44183636 | AuqaKyz | B | Oct. 12, 2018, 12:21 p.m. | OK | GNU C++11 | TESTS | 29 | 46 | 7475200 | 2500 | |
44751556 | ReaLNero1 | B | Oct. 23, 2018, 8:13 p.m. | OK | GNU C++11 | TESTS | 29 | 46 | 7987200 | 2500 | |
43247305 | TLE yanQval | B | Sept. 22, 2018, 11:37 a.m. | OK | GNU C++11 | TESTS | 29 | 46 | 7987200 | 2500 | |
44289066 | Love_mona | B | Oct. 14, 2018, 8:58 a.m. | OK | GNU C++11 | TESTS | 29 | 46 | 8908800 | 2500 | |
62080338 | pikmike | B | Oct. 7, 2019, 8:21 p.m. | OK | GNU C++14 | TESTS | 29 | 78 | 1843200 | 2500 | |
43255609 | chaojidouding was_n dsgsjk | B | Sept. 22, 2018, 1:26 p.m. | OK | GNU C++14 | TESTS | 29 | 78 | 6758400 | 2500 | |
59433642 | goodthingstaketime_._ tanphatls987 MofK | B | Aug. 25, 2019, 7:38 a.m. | OK | GNU C++14 | TESTS | 29 | 78 | 7065600 | 2500 | |
43687208 | ggoh | B | Oct. 2, 2018, 12:50 p.m. | OK | GNU C++14 | TESTS | 29 | 78 | 19251200 | 2500 | |
43248501 | yashChandnani gravito12345 | B | Sept. 22, 2018, 11:50 a.m. | OK | GNU C++14 | TESTS | 29 | 93 | 4608000 | 2500 | |
65625091 | DoanPhuDuc | B | Nov. 24, 2019, 7:41 a.m. | OK | GNU C++14 | TESTS | 29 | 93 | 5120000 | 2500 | |
44941528 | chemthan | B | Oct. 27, 2018, 8:02 a.m. | OK | GNU C++14 | TESTS | 29 | 93 | 5120000 | 2500 | |
43392672 | apiadu | B | Sept. 25, 2018, 2:41 a.m. | OK | GNU C++14 | TESTS | 29 | 93 | 5632000 | 2500 | |
43817897 | black_horse2014 kutengine ksi1996 | B | Oct. 5, 2018, 6:34 a.m. | OK | GNU C++14 | TESTS | 29 | 93 | 6348800 | 2500 | |
43251355 | DongwonShin imeimi | B | Sept. 22, 2018, 12:25 p.m. | OK | GNU C++14 | TESTS | 29 | 93 | 6451200 | 2500 | |
43431545 | DZYO | B | Sept. 26, 2018, 1:45 a.m. | OK | GNU C++17 | TESTS | 29 | 62 | 12800000 | 2500 | |
43248788 | ainta | B | Sept. 22, 2018, 11:54 a.m. | OK | GNU C++17 | TESTS | 29 | 78 | 5120000 | 2500 | |
52517707 | sdcgvhgj | B | April 9, 2019, 6:46 a.m. | OK | GNU C++17 | TESTS | 29 | 78 | 9625600 | 2500 | |
43857373 | ialakhtin | B | Oct. 5, 2018, 4:15 p.m. | OK | GNU C++17 | TESTS | 29 | 93 | 3481600 | 2500 | |
43458557 | Fedosik kefaa2 gepardo | B | Sept. 26, 2018, 4:03 p.m. | OK | GNU C++17 | TESTS | 29 | 93 | 4505600 | 2500 | |
54005773 | KasugaAyumu | B | May 11, 2019, 7:49 p.m. | OK | GNU C++17 | TESTS | 29 | 93 | 5120000 | 2500 | |
45312228 | mango_lassi | B | Nov. 5, 2018, 5:21 a.m. | OK | GNU C++17 | TESTS | 29 | 93 | 5120000 | 2500 | |
43285301 | SheepRanger | B | Sept. 23, 2018, 7:59 a.m. | OK | GNU C++17 | TESTS | 29 | 93 | 5324800 | 2500 | |
49997206 | vjudge3 | B | Feb. 16, 2019, 3:32 p.m. | OK | GNU C++17 | TESTS | 29 | 93 | 5632000 | 2500 | |
43261068 | yujinwunz | B | Sept. 22, 2018, 2:49 p.m. | OK | GNU C++17 | TESTS | 29 | 93 | 5939200 | 2500 | |
43246491 | uwi | B | Sept. 22, 2018, 11:27 a.m. | OK | Java 8 | TESTS | 29 | 264 | 28774400 | 2500 | |
43265737 | amnesiac_dusk | B | Sept. 22, 2018, 4:23 p.m. | OK | Java 8 | TESTS | 29 | 1403 | 32563200 | 2500 | |
67270193 | Eva | B | Dec. 20, 2019, 7:53 a.m. | OK | MS C++ 2017 | TESTS | 29 | 93 | 5017600 | 2500 | |
44334768 | LordVader | B | Oct. 14, 2018, 8:34 p.m. | OK | PyPy 3 | TESTS | 29 | 374 | 26931200 | 2500 |
Back to search problems