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"Yurii is sure he can do everything. Can he solve this task, though? He has an array a consisting of n positive integers. Let's call a subarray a[l...r] good if the following conditions are simultaneously satisfied: In other words, a subarray is good if the bitwise XOR of the two border elements is equal to the sum of the rest of the elements. Yurii wants to calculate the total number of good subarrays. What is it equal to? An array c is a subarray of an array d if c can be obtained from d by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. The first line contains a single integer n ( 3 <= q n <= q 2 cdot 10^5 ) -- the length of a . The second line contains n integers a_1,a_2, ldots,a_n ( 1 <= q a_i lt 2^{30} ) -- elements of a . Output a single integer -- the number of good subarrays. There are 6 good subarrays in the example: "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
98322218 |
Gassa |
E |
Nov. 13, 2020, 4:27 p.m. |
OK |
D |
TESTS |
33 |
405 |
13516800 |
|
|
98320095 |
Maksim1744 |
E |
Nov. 13, 2020, 4:14 p.m. |
OK |
GNU C11 |
TESTS |
33 |
78 |
1638400 |
|
|
98330462 |
rainboy |
E |
Nov. 13, 2020, 6:34 p.m. |
OK |
GNU C11 |
TESTS |
33 |
78 |
7987200 |
|
|
98353188 |
WaluntOvO |
E |
Nov. 14, 2020, 5:46 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
31 |
16076800 |
|
|
98348181 |
mollnn |
E |
Nov. 14, 2020, 3:42 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
46 |
2867200 |
|
|
98340960 |
zzkkaiming |
E |
Nov. 13, 2020, 11:41 p.m. |
OK |
GNU C++11 |
TESTS |
33 |
46 |
16793600 |
|
|
98320922 |
eudanip |
E |
Nov. 13, 2020, 4:20 p.m. |
OK |
GNU C++11 |
TESTS |
33 |
62 |
614400 |
|
|
98335349 |
OMG_wc |
E |
Nov. 13, 2020, 8:11 p.m. |
OK |
GNU C++11 |
TESTS |
33 |
62 |
1433600 |
|
|
98351080 |
huanggs |
E |
Nov. 14, 2020, 5:01 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
77 |
135577600 |
|
|
98320221 |
00001 |
E |
Nov. 13, 2020, 4:15 p.m. |
OK |
GNU C++11 |
TESTS |
33 |
78 |
4812800 |
|
|
98344683 |
Wyxrg |
E |
Nov. 14, 2020, 2:12 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
93 |
819200 |
|
|
98330998 |
ParsaBahrami |
E |
Nov. 13, 2020, 6:43 p.m. |
OK |
GNU C++11 |
TESTS |
33 |
93 |
4812800 |
|
|
98311828 |
Pyqe |
E |
Nov. 13, 2020, 3:37 p.m. |
OK |
GNU C++11 |
TESTS |
33 |
93 |
7168000 |
|
|
98331716 |
A_U_I |
E |
Nov. 13, 2020, 6:56 p.m. |
OK |
GNU C++14 |
TESTS |
33 |
62 |
819200 |
|
|
98328721 |
cheissmart |
E |
Nov. 13, 2020, 6:08 p.m. |
OK |
GNU C++14 |
TESTS |
33 |
77 |
819200 |
|
|
98315856 |
hamlet |
E |
Nov. 13, 2020, 3:53 p.m. |
OK |
GNU C++14 |
TESTS |
33 |
77 |
1638400 |
|
|
98348579 |
Indecchi |
E |
Nov. 14, 2020, 3:52 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
77 |
1638400 |
|
|
98351174 |
HanTroid |
E |
Nov. 14, 2020, 5:03 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
77 |
2560000 |
|
|
98353197 |
Kira_1234 |
E |
Nov. 14, 2020, 5:46 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
77 |
3686400 |
|
|
98338417 |
PavelChadnov |
E |
Nov. 13, 2020, 9:36 p.m. |
OK |
GNU C++14 |
TESTS |
33 |
77 |
3993600 |
|
|
98318921 |
kzvd4729 |
E |
Nov. 13, 2020, 4:08 p.m. |
OK |
GNU C++14 |
TESTS |
33 |
77 |
4812800 |
|
|
98340567 |
MarcosK |
E |
Nov. 13, 2020, 11:23 p.m. |
OK |
GNU C++14 |
TESTS |
33 |
78 |
819200 |
|
|
98344789 |
2018LZY |
E |
Nov. 14, 2020, 2:15 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
93 |
3993600 |
|
|
98313589 |
LayCurse |
E |
Nov. 13, 2020, 3:43 p.m. |
OK |
GNU C++17 |
TESTS |
33 |
46 |
5324800 |
|
|
98336130 |
Kavo_Chego |
E |
Nov. 13, 2020, 8:29 p.m. |
OK |
GNU C++17 |
TESTS |
33 |
77 |
1638400 |
|
|
98350588 |
chen_zexing |
E |
Nov. 14, 2020, 4:49 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
77 |
2457600 |
|
|
98351386 |
PaliLo |
E |
Nov. 14, 2020, 5:09 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
78 |
819200 |
|
|
98335580 |
MilosMilutinovic371 |
E |
Nov. 13, 2020, 8:16 p.m. |
OK |
GNU C++17 |
TESTS |
33 |
78 |
1331200 |
|
|
98346793 |
AlexFetisov |
E |
Nov. 14, 2020, 3:06 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
78 |
1638400 |
|
|
98330432 |
Sho10 |
E |
Nov. 13, 2020, 6:34 p.m. |
OK |
GNU C++17 |
TESTS |
33 |
78 |
1638400 |
|
|
98349174 |
maomao90 |
E |
Nov. 14, 2020, 4:09 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
78 |
1638400 |
|
|
98338525 |
GretaM |
E |
Nov. 13, 2020, 9:41 p.m. |
OK |
GNU C++17 |
TESTS |
33 |
78 |
2457600 |
|
|
98337686 |
Gajowy |
E |
Nov. 13, 2020, 9:10 p.m. |
OK |
GNU C++17 |
TESTS |
33 |
78 |
2457600 |
|
|
98344223 |
YLWang |
E |
Nov. 14, 2020, 1:58 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
31 |
2867200 |
|
|
98350290 |
Ormlis |
E |
Nov. 14, 2020, 4:40 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
46 |
1638400 |
|
|
98340433 |
MarcosK |
E |
Nov. 13, 2020, 11:17 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
61 |
1638400 |
|
|
98344895 |
Jorge213 |
E |
Nov. 14, 2020, 2:18 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
61 |
2560000 |
|
|
98346820 |
Sevatar |
E |
Nov. 14, 2020, 3:07 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
61 |
2662400 |
|
|
98348311 |
chctxdy68 |
E |
Nov. 14, 2020, 3:45 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
61 |
2662400 |
|
|
98343095 |
hitonanode |
E |
Nov. 14, 2020, 1:19 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
62 |
819200 |
|
|
98309260 |
saketh |
E |
Nov. 13, 2020, 3:28 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
62 |
819200 |
|
|
98317107 |
oleh1421 |
E |
Nov. 13, 2020, 3:59 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
62 |
1228800 |
|
|
98330122 |
Agusanso |
E |
Nov. 13, 2020, 6:29 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
62 |
1638400 |
|
|
98339059 |
skittles1412 |
E |
Nov. 13, 2020, 10:04 p.m. |
OK |
Java 11 |
TESTS |
33 |
389 |
16998400 |
|
|
98338804 |
Scotty_pwnz |
E |
Nov. 13, 2020, 9:52 p.m. |
OK |
Kotlin |
TESTS |
33 |
280 |
16998400 |
|
|
98323051 |
Tlatoani |
E |
Nov. 13, 2020, 4:32 p.m. |
OK |
Kotlin |
TESTS |
33 |
327 |
18636800 |
|
|
98337918 |
xiryss |
E |
Nov. 13, 2020, 9:19 p.m. |
OK |
MS C++ 2017 |
TESTS |
33 |
405 |
97792000 |
|
|
98337931 |
xiryss |
E |
Nov. 13, 2020, 9:19 p.m. |
OK |
MS C++ 2017 |
TESTS |
33 |
421 |
98611200 |
|
|
98339035 |
hxu10 |
E |
Nov. 13, 2020, 10:03 p.m. |
OK |
PyPy 2 |
TESTS |
33 |
171 |
12800000 |
|
|
98334485 |
celerity |
E |
Nov. 13, 2020, 7:51 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
342 |
18944000 |
|
|
98338172 |
silvertint |
E |
Nov. 13, 2020, 9:27 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
748 |
24780800 |
|
|
remove filters
Back to search problems