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 |
---|---|---|---|---|---|---|
1119 | Codeforces Global Round 2 | FINISHED | False | 7200 | 182975123 | April 6, 2019, 11:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 589 ) | H | Triple | PROGRAMMING | fft math | 3100 |
B'You have received your birthday gifts -- n triples of integers! The i -th of them is lbrace a_{i}, b_{i}, c_{i} rbrace . All numbers are greater than or equal to 0 , and strictly smaller than 2^{k} , where k is a fixed integer. One day, you felt tired playing with triples. So you came up with three new integers x , y , z , and then formed n arrays. The i -th array consists of a_i repeated x times, b_i repeated y times and c_i repeated z times. Thus, each array has length (x + y + z) . You want to choose exactly one integer from each array such that the XOR (bitwise exclusive or) of them is equal to t . Output the number of ways to choose the numbers for each t between 0 and 2^{k} - 1 , inclusive, modulo 998244353 . The first line contains two integers n and k ( 1 <= q n <= q 10^{5} , 1 <= q k <= q 17 ) -- the number of arrays and the binary length of all numbers. The second line contains three integers x , y , z ( 0 <= q x,y,z <= q 10^{9} ) -- the integers you chose. Then n lines follow. The i -th of them contains three integers a_{i} , b_{i} and c_{i} ( 0 <= q a_{i} , b_{i} , c_{i} <= q 2^{k} - 1 ) -- the integers forming the i -th array. Print a single line containing 2^{k} integers. The i -th of them should be the number of ways to choose exactly one integer from each array so that their XOR is equal to t = i-1 modulo 998244353 . In the first example, the array we formed is (1, 0, 0, 1, 1, 1) , we have two choices to get 0 as the XOR and four choices to get 1 . In the second example, two arrays are (0, 1, 1, 2) and (1, 2, 2, 3) . There are sixteen (4 cdot 4) choices in total, 4 of them ( 1 oplus 1 and 2 oplus 2 , two options for each) give 0 , 2 of them ( 0 '... |
Codeforces Global Round 2 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
52458818 | 131131yhx | H | April 7, 2019, 12:37 p.m. | OK | Clang++17 Diagnostics | TESTS | 22 | 436 | 15769600 | 3100 | |
52478483 | hos.lyric | H | April 8, 2019, 2:39 a.m. | OK | D | TESTS | 22 | 265 | 22425600 | 3100 | |
52458944 | 131131yhx | H | April 7, 2019, 12:40 p.m. | OK | GNU C11 | TESTS | 22 | 530 | 14745600 | 3100 | |
62565477 | luogu_bot4 | H | Oct. 14, 2019, 1:08 p.m. | OK | GNU C++11 | TESTS | 22 | 61 | 4198400 | 3100 | |
62503639 | luogu_bot1 | H | Oct. 13, 2019, 11:39 a.m. | OK | GNU C++11 | TESTS | 22 | 62 | 5836800 | 3100 | |
62503846 | luogu_bot4 | H | Oct. 13, 2019, 11:46 a.m. | OK | GNU C++11 | TESTS | 22 | 62 | 5836800 | 3100 | |
52459293 | 131131yhx | H | April 7, 2019, 12:47 p.m. | OK | GNU C++11 | TESTS | 22 | 78 | 14131200 | 3100 | |
52458454 | 131131yhx | H | April 7, 2019, 12:28 p.m. | OK | GNU C++11 | TESTS | 22 | 93 | 13516800 | 3100 | |
52458995 | 131131yhx | H | April 7, 2019, 12:41 p.m. | OK | GNU C++11 | TESTS | 22 | 108 | 14540800 | 3100 | |
52458590 | 131131yhx | H | April 7, 2019, 12:31 p.m. | OK | GNU C++11 | TESTS | 22 | 109 | 13516800 | 3100 | |
52458628 | 131131yhx | H | April 7, 2019, 12:32 p.m. | OK | GNU C++11 | TESTS | 22 | 109 | 13516800 | 3100 | |
53854023 | FightForWin | H | May 7, 2019, 3:03 p.m. | OK | GNU C++11 | TESTS | 22 | 155 | 4812800 | 3100 | |
52457332 | memset0c | H | April 7, 2019, 12:15 p.m. | OK | GNU C++11 | TESTS | 22 | 156 | 4812800 | 3100 | |
52458657 | 131131yhx | H | April 7, 2019, 12:33 p.m. | OK | GNU C++14 | TESTS | 22 | 109 | 13619200 | 3100 | |
52597163 | RNS_KSB | H | April 11, 2019, 9:46 a.m. | OK | GNU C++14 | TESTS | 22 | 124 | 6860800 | 3100 | |
52481385 | qiqi20021026 | H | April 8, 2019, 5:49 a.m. | OK | GNU C++14 | TESTS | 22 | 171 | 18534400 | 3100 | |
68252995 | iotang | H | Jan. 5, 2020, 2:26 p.m. | OK | GNU C++14 | TESTS | 22 | 202 | 4198400 | 3100 | |
52513512 | mayaohua2003 | H | April 9, 2019, 2:38 a.m. | OK | GNU C++14 | TESTS | 22 | 202 | 4198400 | 3100 | |
52590463 | Rulenoonenevercomesecond | H | April 11, 2019, 5:11 a.m. | OK | GNU C++14 | TESTS | 22 | 218 | 2150400 | 3100 | |
53114032 | jslijin | H | April 22, 2019, 6:28 a.m. | OK | GNU C++14 | TESTS | 22 | 218 | 3174400 | 3100 | |
59918437 | ash_98 | H | Sept. 2, 2019, 8:35 p.m. | OK | GNU C++14 | TESTS | 22 | 218 | 8601600 | 3100 | |
52411484 | apiadu | H | April 6, 2019, 1:31 p.m. | OK | GNU C++14 | TESTS | 22 | 233 | 2150400 | 3100 | |
55528486 | tusg25 | H | June 13, 2019, 12:22 p.m. | OK | GNU C++14 | TESTS | 22 | 233 | 2662400 | 3100 | |
54092568 | CMXRYNP | H | May 14, 2019, 11:33 a.m. | OK | GNU C++17 | TESTS | 22 | 46 | 14131200 | 3100 | |
52562687 | ainta | H | April 10, 2019, 11:13 a.m. | OK | GNU C++17 | TESTS | 22 | 109 | 9728000 | 3100 | |
67584372 | alan_cty | H | Dec. 25, 2019, 7:38 a.m. | OK | GNU C++17 | TESTS | 22 | 124 | 5427200 | 3100 | |
67584152 | alan_cty | H | Dec. 25, 2019, 7:32 a.m. | OK | GNU C++17 | TESTS | 22 | 139 | 5427200 | 3100 | |
52458438 | 131131yhx | H | April 7, 2019, 12:28 p.m. | OK | GNU C++17 | TESTS | 22 | 139 | 13619200 | 3100 | |
52458643 | 131131yhx | H | April 7, 2019, 12:32 p.m. | OK | GNU C++17 | TESTS | 22 | 140 | 13619200 | 3100 | |
52484869 | maroonrk | H | April 8, 2019, 8:19 a.m. | OK | GNU C++17 | TESTS | 22 | 187 | 12902400 | 3100 | |
52771589 | dafeng | H | April 15, 2019, 9:11 a.m. | OK | GNU C++17 | TESTS | 22 | 202 | 2662400 | 3100 | |
54440931 | SYCstudio | H | May 21, 2019, 8:37 a.m. | OK | GNU C++17 | TESTS | 22 | 217 | 2355200 | 3100 | |
68849525 | hk-cnyali | H | Jan. 15, 2020, 8:29 a.m. | OK | GNU C++17 | TESTS | 22 | 217 | 127692800 | 3100 | |
52467936 | mmaxio | H | April 7, 2019, 4:48 p.m. | OK | Java 8 | TESTS | 22 | 202 | 0 | 3100 | |
54501724 | mmaxio | H | May 22, 2019, 9:28 p.m. | OK | Java 8 | TESTS | 22 | 311 | 4403200 | 3100 | |
53274460 | dalt | H | April 25, 2019, 8:35 a.m. | OK | Java 8 | TESTS | 22 | 404 | 7372800 | 3100 | |
52458769 | 131131yhx | H | April 7, 2019, 12:36 p.m. | OK | MS C++ | TESTS | 22 | 140 | 14745600 | 3100 | |
52458809 | 131131yhx | H | April 7, 2019, 12:37 p.m. | OK | MS C++ 2017 | TESTS | 22 | 155 | 14745600 | 3100 | |
52511941 | kobae964 | H | April 9, 2019, 12:27 a.m. | OK | Rust | TESTS | 22 | 327 | 6758400 | 3100 | |
52418535 | kobae964 | H | April 6, 2019, 4:06 p.m. | OK | Rust | TESTS | 22 | 327 | 6758400 | 3100 |
Back to search problems