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.
Problems
B'You are given n integers a1, xe2 x80 x89 xe2 x80 x89a2, xe2 x80 x89 xe2 x80 x89..., xe2 x80 x89 xe2 x80 x89an. A sequence of integers x1, xe2 x80 x89 xe2 x80 x89x2, xe2 x80 x89 xe2 x80 x89..., xe2 x80 x89 xe2 x80 x89xk is called a "xor-sequence" if for every 1 xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89i xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89k xe2 x80 x89- xe2 x80 x891 the number of ones in the binary representation of the number xi xi xe2 x80 x89 xe2 x80 x89+ xe2 x80 x89 xe2 x80 x891 's is a multiple of 3 and for all 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k. The symbol is used for the binary exclusive or operation. How many "xor-sequences" of length k exist? Output the answer modulo 109 xe2 x80 x89+ xe2 x80 x897. Note if a xe2 x80 x89= xe2 x80 x89[1, xe2 x80 x891] and k xe2 x80 x89= xe2 x80 x891 then the answer is 2, because you should consider the ones from a as different. The first line contains two integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018) -- the number of given integers and the length of the "xor-sequences". The second line contains n integers ai (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018). Print the only integer c -- the number of "xor-sequences" of length k modulo 109 xe2 x80 x89+ xe2 x80 x897. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
19475989 |
lkmcfj |
E |
July 29, 2016, 8:46 a.m. |
OK |
FPC |
TESTS |
12 |
1575 |
2662400 |
|
2000 |
19092007 |
hvcuong98 |
E |
July 13, 2016, 5:53 p.m. |
OK |
FPC |
TESTS |
12 |
1622 |
8192000 |
|
2000 |
19103104 |
ruban |
E |
July 14, 2016, 8:08 a.m. |
OK |
FPC |
TESTS |
12 |
1825 |
49664000 |
|
2000 |
21532411 |
ngattaro1 |
E |
Oct. 17, 2016, 3:15 p.m. |
OK |
FPC |
TESTS |
12 |
2761 |
7065600 |
|
2000 |
19095392 |
Chipe1 |
E |
July 13, 2016, 7:40 p.m. |
OK |
GNU C |
TESTS |
12 |
1621 |
204800 |
|
2000 |
37293548 |
rainboy |
E |
April 13, 2018, 5:18 p.m. |
OK |
GNU C |
TESTS |
12 |
1731 |
3481600 |
|
2000 |
19146206 |
time_is_space |
E |
July 15, 2016, 7:28 a.m. |
OK |
GNU C++ |
TESTS |
12 |
187 |
0 |
|
2000 |
23350473 |
ivanilos |
E |
Dec. 27, 2016, 1:18 a.m. |
OK |
GNU C++ |
TESTS |
12 |
280 |
2150400 |
|
2000 |
20187232 |
Wuvin |
E |
Aug. 27, 2016, 4:06 a.m. |
OK |
GNU C++ |
TESTS |
12 |
280 |
2252800 |
|
2000 |
19086316 |
sgtlaugh |
E |
July 13, 2016, 5:01 p.m. |
OK |
GNU C++ |
TESTS |
12 |
374 |
204800 |
|
2000 |
23350469 |
ivanilos |
E |
Dec. 27, 2016, 1:17 a.m. |
OK |
GNU C++ |
TESTS |
12 |
374 |
2150400 |
|
2000 |
22659379 |
abhi1agarwal |
E |
Dec. 2, 2016, 2:24 p.m. |
OK |
GNU C++ |
TESTS |
12 |
390 |
307200 |
|
2000 |
19362942 |
nxphuc |
E |
July 23, 2016, 10:41 a.m. |
OK |
GNU C++ |
TESTS |
12 |
405 |
102400 |
|
2000 |
23350458 |
ivanilos |
E |
Dec. 27, 2016, 1:16 a.m. |
OK |
GNU C++ |
TESTS |
12 |
576 |
2150400 |
|
2000 |
19089768 |
moonflyer |
E |
July 13, 2016, 5:29 p.m. |
OK |
GNU C++ |
TESTS |
12 |
608 |
204800 |
|
2000 |
19294787 |
coco0115401 |
E |
July 21, 2016, 6:26 a.m. |
OK |
GNU C++ |
TESTS |
12 |
888 |
409600 |
|
2000 |
50530466 |
dtcxzyw |
E |
Feb. 26, 2019, 1:26 p.m. |
OK |
GNU C++11 |
TESTS |
12 |
140 |
409600 |
|
2000 |
20566849 |
thomas |
E |
Sept. 13, 2016, 12:17 p.m. |
OK |
GNU C++11 |
TESTS |
12 |
187 |
0 |
|
2000 |
19843783 |
isimiso |
E |
Aug. 13, 2016, 7:01 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
187 |
2252800 |
|
2000 |
40984097 |
ReaLNero1 |
E |
July 30, 2018, 7:11 p.m. |
OK |
GNU C++11 |
TESTS |
12 |
202 |
204800 |
|
2000 |
19136480 |
HellKitsune |
E |
July 14, 2016, 9:16 p.m. |
OK |
GNU C++11 |
TESTS |
12 |
202 |
204800 |
|
2000 |
20567391 |
thomas |
E |
Sept. 13, 2016, 12:39 p.m. |
OK |
GNU C++11 |
TESTS |
12 |
218 |
102400 |
|
2000 |
19110274 |
coderghj |
E |
July 14, 2016, 2:53 p.m. |
OK |
GNU C++11 |
TESTS |
12 |
218 |
102400 |
|
2000 |
20567496 |
thomas |
E |
Sept. 13, 2016, 12:44 p.m. |
OK |
GNU C++11 |
TESTS |
12 |
234 |
102400 |
|
2000 |
20566930 |
thomas |
E |
Sept. 13, 2016, 12:21 p.m. |
OK |
GNU C++11 |
TESTS |
12 |
234 |
102400 |
|
2000 |
19110367 |
coderghj |
E |
July 14, 2016, 2:58 p.m. |
OK |
GNU C++11 |
TESTS |
12 |
234 |
102400 |
|
2000 |
42079526 |
vjudge2 |
E |
Aug. 25, 2018, 7:32 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
296 |
921600 |
|
2000 |
28044305 |
Aviously |
E |
June 25, 2017, 9:06 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
296 |
2048000 |
|
2000 |
42079438 |
vjudge3 |
E |
Aug. 25, 2018, 7:30 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
327 |
72499200 |
|
2000 |
25864924 |
Kmcode |
E |
March 28, 2017, 4:29 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
374 |
2150400 |
|
2000 |
35593259 |
Rezwan.Arefin01 |
E |
Feb. 23, 2018, 10:05 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
390 |
2150400 |
|
2000 |
22137912 |
pparwal12 |
E |
Nov. 9, 2016, 7:33 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
436 |
409600 |
|
2000 |
22139350 |
abhi_1595 |
E |
Nov. 9, 2016, 9:59 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
468 |
307200 |
|
2000 |
22849028 |
Bilguunzen |
E |
Dec. 10, 2016, 5:55 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
483 |
512000 |
|
2000 |
25864910 |
Kmcode |
E |
March 28, 2017, 4:28 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
483 |
2355200 |
|
2000 |
22139414 |
abhi_1595 |
E |
Nov. 9, 2016, 10:08 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
530 |
307200 |
|
2000 |
68755310 |
mobshigeo |
E |
Jan. 14, 2020, 8:05 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
624 |
307200 |
|
2000 |
68744038 |
rainbowbunny |
E |
Jan. 14, 2020, 3:22 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
624 |
307200 |
|
2000 |
68717562 |
_baba_yaga |
E |
Jan. 13, 2020, 3:01 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
624 |
5324800 |
|
2000 |
68760196 |
hikigaya_hachiman |
E |
Jan. 14, 2020, 8:32 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
654 |
307200 |
|
2000 |
63869070 |
chirag11032000 |
E |
Oct. 30, 2019, 5:24 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
654 |
307200 |
|
2000 |
46722840 |
ivan100sic |
E |
Dec. 7, 2018, 1:48 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
670 |
7475200 |
|
2000 |
50283873 |
markotee |
E |
Feb. 21, 2019, 1:57 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
685 |
102400 |
|
2000 |
54739139 |
ZhihuiLiu |
E |
May 28, 2019, 6:48 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
685 |
1228800 |
|
2000 |
49815825 |
luogu_bot5 |
E |
Feb. 12, 2019, 5:49 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
702 |
102400 |
|
2000 |
62399123 |
Hoshi08 |
E |
Oct. 12, 2019, 6:42 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
717 |
409600 |
|
2000 |
19093045 |
ahmad_mamdouh |
E |
July 13, 2016, 6:09 p.m. |
OK |
Java 7 |
TESTS |
12 |
2666 |
0 |
|
2000 |
19085057 |
uwi |
E |
July 13, 2016, 4:51 p.m. |
OK |
Java 8 |
TESTS |
12 |
530 |
0 |
|
2000 |
59322791 |
Jarik |
E |
Aug. 22, 2019, 7:02 p.m. |
OK |
Java 8 |
TESTS |
12 |
639 |
0 |
|
2000 |
59323022 |
Jarik |
E |
Aug. 22, 2019, 7:08 p.m. |
OK |
Java 8 |
TESTS |
12 |
685 |
0 |
|
2000 |
19088922 |
pitfall |
E |
July 13, 2016, 5:21 p.m. |
OK |
Java 8 |
TESTS |
12 |
1528 |
0 |
|
2000 |
55525571 |
Ahmed_Diab |
E |
June 13, 2019, 10:59 a.m. |
OK |
Java 8 |
TESTS |
12 |
1824 |
0 |
|
2000 |
20743782 |
Dukkha |
E |
Sept. 18, 2016, 8:52 p.m. |
OK |
Java 8 |
TESTS |
12 |
1949 |
0 |
|
2000 |
20016940 |
hady1100 |
E |
Aug. 21, 2016, 2:21 a.m. |
OK |
Java 8 |
TESTS |
12 |
1949 |
20480000 |
|
2000 |
28072535 |
Minaa |
E |
June 27, 2017, 8:43 a.m. |
OK |
Java 8 |
TESTS |
12 |
1949 |
20787200 |
|
2000 |
19436984 |
alibaba |
E |
July 27, 2016, 8:36 a.m. |
OK |
Java 8 |
TESTS |
12 |
1996 |
0 |
|
2000 |
20662957 |
Hoda_Hisham |
E |
Sept. 16, 2016, 3:14 p.m. |
OK |
Java 8 |
TESTS |
12 |
2043 |
0 |
|
2000 |
21268601 |
dyukha |
E |
Oct. 8, 2016, 12:17 a.m. |
OK |
Kotlin |
TESTS |
12 |
1933 |
22323200 |
|
2000 |
41135667 |
MrDindows |
E |
Aug. 2, 2018, 8:37 p.m. |
OK |
Mono C# |
TESTS |
12 |
1809 |
7270400 |
|
2000 |
41135188 |
dmkozyrev |
E |
Aug. 2, 2018, 8:14 p.m. |
OK |
Mono C# |
TESTS |
12 |
2386 |
8806400 |
|
2000 |
19309384 |
DigitalArtistKz |
E |
July 21, 2016, 8:45 p.m. |
OK |
MS C# |
TESTS |
12 |
1949 |
9216000 |
|
2000 |
19086901 |
azukun |
E |
July 13, 2016, 5:05 p.m. |
OK |
MS C# |
TESTS |
12 |
2245 |
7782400 |
|
2000 |
26311762 |
Los_Angelos_Laycurse |
E |
April 12, 2017, 6:20 a.m. |
OK |
MS C++ |
TESTS |
12 |
685 |
2150400 |
|
2000 |
19786494 |
vjudge5 |
E |
Aug. 11, 2016, 2:56 p.m. |
OK |
MS C++ |
TESTS |
12 |
1326 |
2560000 |
|
2000 |
19088562 |
P___ |
E |
July 13, 2016, 5:18 p.m. |
OK |
MS C++ |
TESTS |
12 |
1341 |
204800 |
|
2000 |
19786464 |
whitebear123 |
E |
Aug. 11, 2016, 2:54 p.m. |
OK |
MS C++ |
TESTS |
12 |
1341 |
2355200 |
|
2000 |
19087047 |
Carups |
E |
July 13, 2016, 5:06 p.m. |
OK |
MS C++ |
TESTS |
12 |
1419 |
204800 |
|
2000 |
19088787 |
AleksanderBalobanov |
E |
July 13, 2016, 5:20 p.m. |
OK |
MS C++ |
TESTS |
12 |
1419 |
12288000 |
|
2000 |
19093493 |
Qwerty132 |
E |
July 13, 2016, 6:20 p.m. |
OK |
MS C++ |
TESTS |
12 |
1513 |
10035200 |
|
2000 |
19155128 |
vjudge5 |
E |
July 15, 2016, 2:04 p.m. |
OK |
MS C++ |
TESTS |
12 |
1856 |
1228800 |
|
2000 |
19786804 |
vjudge3 |
E |
Aug. 11, 2016, 3:21 p.m. |
OK |
MS C++ |
TESTS |
12 |
1856 |
3584000 |
|
2000 |
19781108 |
vjudge3 |
E |
Aug. 11, 2016, 9:39 a.m. |
OK |
MS C++ |
TESTS |
12 |
1856 |
3686400 |
|
2000 |
remove filters
Back to search problems