Codeforces Round 539 (Div. 1)

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
1109 Codeforces Round 539 (Div. 1) FINISHED False 9000 187190723 Feb. 16, 2019, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8584 ) A Sasha and a Bit of Relax PROGRAMMING dp implementation 1600

B"Sasha likes programming. Once, during a very long contest, Sasha decided that he was a bit tired and needed to relax. So he did. But since Sasha isn't an ordinary guy, he prefers to relax unusually. During leisure time Sasha likes to upsolve unsolved problems because upsolving is very useful. Therefore, Sasha decided to upsolve the following problem: You have an array a with n integers. You need to count the number of funny pairs (l, r) (l <= q r) . To check if a pair (l, r) is a funny pair, take mid = frac{l + r - 1}{2} , then if r - l + 1 is an even number and a_l oplus a_{l+1} oplus ldots oplus a_{mid} = a_{mid + 1} oplus a_{mid + 2} oplus ldots oplus a_r , then the pair is funny. In other words, oplus of elements of the left half of the subarray from l to r should be equal to oplus of elements of the right half. Note that oplus denotes the bitwise XOR operation. It is time to continue solving the contest, so Sasha asked you to solve this task. The first line contains one integer n ( 2 <= n <= 3 cdot 10^5 ) -- the size of the array. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i < 2^{20} ) -- array itself. Print one integer -- the number of funny pairs. You should consider only pairs where r - l + 1 is even number. Be as cool as Sasha, upsolve problems! In the first example, the only funny pair is (2, 5) , as 2 oplus 3 = 4 oplus 5 = 1 . In the second example, funny pairs are (2, 3) , (1, 4) , and (3, 6) . In the third example, there are no funny pairs. "...

Tutorials

Codeforces Round #539 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50665307 yafngzh A March 2, 2019, 3:37 a.m. OK Clang++17 Diagnostics TESTS 50 124 10137600 1600
50049767 libra8z A Feb. 17, 2019, 7:37 a.m. OK GNU C11 TESTS 50 93 8396800 1600
49999500 rainboy A Feb. 16, 2019, 4:39 p.m. OK GNU C11 TESTS 50 93 8396800 1600
51778864 dhruv1998 A March 24, 2019, 2:22 a.m. OK GNU C++11 TESTS 50 31 9625600 1600
51120733 Wolfycz A March 10, 2019, 9:06 a.m. OK GNU C++11 TESTS 50 31 10854400 1600
50041020 RabbitHu A Feb. 17, 2019, 1:53 a.m. OK GNU C++11 TESTS 50 31 16793600 1600
54838315 Frame233 A May 30, 2019, 11:46 a.m. OK GNU C++11 TESTS 50 31 19046400 1600
50692105 EncodeTalker A March 2, 2019, 4:11 p.m. OK GNU C++11 TESTS 50 31 20070400 1600
50077844 samjia2000 A Feb. 18, 2019, 12:18 a.m. OK GNU C++11 TESTS 50 31 24064000 1600
52290248 wibE A April 4, 2019, 12:35 a.m. OK GNU C++11 TESTS 50 46 8192000 1600
52020641 Durant_Lee A March 30, 2019, 12:33 p.m. OK GNU C++11 TESTS 50 46 8396800 1600
53865806 luogu_bot4 A May 8, 2019, 3:39 a.m. OK GNU C++11 TESTS 50 46 8396800 1600
63925749 luogu_bot1 A Oct. 31, 2019, 12:58 p.m. OK GNU C++11 TESTS 50 46 8396800 1600
50628279 HatsuneMikuo A March 1, 2019, 7:31 a.m. OK GNU C++14 TESTS 50 46 83558400 1600
50002895 Hasan0540 A Feb. 16, 2019, 4:47 p.m. OK GNU C++14 TESTS 50 78 8396800 1600
50000235 beginend A Feb. 16, 2019, 4:41 p.m. OK GNU C++14 TESTS 50 78 9625600 1600
50042635 cgupta08041999 A Feb. 17, 2019, 3:22 a.m. OK GNU C++14 TESTS 50 78 9625600 1600
50007085 VeryLonelyRaccoon A Feb. 16, 2019, 4:57 p.m. OK GNU C++14 TESTS 50 78 9625600 1600
50603378 baneling A Feb. 28, 2019, 1:36 p.m. OK GNU C++14 TESTS 50 78 18022400 1600
66135864 vjudge2 A Dec. 1, 2019, 12:10 p.m. OK GNU C++14 TESTS 50 78 36044800 1600
50066046 skrydg A Feb. 17, 2019, 2:51 p.m. OK GNU C++14 TESTS 50 78 40038400 1600
51730291 vjudge1 A March 22, 2019, 8:49 p.m. OK GNU C++14 TESTS 50 93 8396800 1600
50402707 zimpha A Feb. 23, 2019, 6:58 p.m. OK GNU C++14 TESTS 50 93 8396800 1600
50002035 IgorSmirnov A Feb. 16, 2019, 4:45 p.m. OK GNU C++17 TESTS 50 46 9625600 1600
50701890 .tx A March 2, 2019, 10:30 p.m. OK GNU C++17 TESTS 50 46 13824000 1600
50049825 fcwww A Feb. 17, 2019, 7:39 a.m. OK GNU C++17 TESTS 50 78 14438400 1600
58396276 OneLastTime A Aug. 6, 2019, 3:45 p.m. OK GNU C++17 TESTS 50 78 136908800 1600
56502063 TrivialMan A July 4, 2019, 6:48 a.m. OK GNU C++17 TESTS 50 93 6041600 1600
50000542 saketh A Feb. 16, 2019, 4:42 p.m. OK GNU C++17 TESTS 50 93 6656000 1600
50085082 Kuroni A Feb. 18, 2019, 6:57 a.m. OK GNU C++17 TESTS 50 93 8396800 1600
50037188 kefaa2 A Feb. 16, 2019, 9:38 p.m. OK GNU C++17 TESTS 50 93 8396800 1600
69811715 zxcv_1 A Jan. 30, 2020, 4:39 a.m. OK GNU C++17 TESTS 50 93 9625600 1600
69213525 krishkhatri28 A Jan. 20, 2020, 9:41 p.m. OK GNU C++17 TESTS 50 93 9625600 1600
50551935 __pikachu__ A Feb. 27, 2019, 5:15 a.m. OK Go TESTS 50 373 9830400 1600
50319302 wallence A Feb. 22, 2019, 1:44 p.m. OK Go TESTS 50 436 9830400 1600
50050361 Ziklon A Feb. 17, 2019, 7:53 a.m. OK Java 8 TESTS 50 124 5120000 1600
50035004 PrakharJain A Feb. 16, 2019, 8:25 p.m. OK Java 8 TESTS 50 140 5120000 1600
50004899 icpc_loser A Feb. 16, 2019, 4:51 p.m. OK Java 8 TESTS 50 155 38809600 1600
50023222 poikniok A Feb. 16, 2019, 6:01 p.m. OK Java 8 TESTS 50 155 43008000 1600
50004150 Musin A Feb. 16, 2019, 4:49 p.m. OK Java 8 TESTS 50 156 6144000 1600
50016825 niyaznigmatul A Feb. 16, 2019, 5:30 p.m. OK Java 8 TESTS 50 171 2867200 1600
51071880 Omar_Morsi A March 9, 2019, 7:59 a.m. OK Java 8 TESTS 50 186 23859200 1600
50073402 kunal23 A Feb. 17, 2019, 7:15 p.m. OK Java 8 TESTS 50 186 28569600 1600
50003721 Slamur A Feb. 16, 2019, 4:49 p.m. OK Java 8 TESTS 50 187 13312000 1600
50001274 AkshajK A Feb. 16, 2019, 4:43 p.m. OK Java 8 TESTS 50 202 9216000 1600
51887352 swanf A March 27, 2019, 7:10 a.m. OK JavaScript TESTS 50 249 46489600 1600
51671360 exs A March 22, 2019, 8:25 a.m. OK Kotlin TESTS 50 530 43520000 1600
50153744 mrskotlin A Feb. 19, 2019, 8:52 a.m. OK Kotlin TESTS 50 561 15052800 1600
50609488 Lishy2010 A Feb. 28, 2019, 4:13 p.m. OK Kotlin TESTS 50 639 16384000 1600
56159860 og.kostya A June 27, 2019, 11:53 a.m. OK Mono C# TESTS 50 156 27136000 1600
50870688 scorpiowf A March 6, 2019, 1:14 a.m. OK MS C++ TESTS 50 93 2457600 1600
51920218 oi000 A March 28, 2019, 3:30 a.m. OK MS C++ TESTS 50 93 35225600 1600
50415435 vjudge4 A Feb. 24, 2019, 6:16 a.m. OK MS C++ TESTS 50 109 13209600 1600
52439952 vjudge5 A April 7, 2019, 5:59 a.m. OK MS C++ TESTS 50 233 36864000 1600
50411351 vjudge1 A Feb. 24, 2019, 2:53 a.m. OK MS C++ TESTS 50 234 13516800 1600
50411431 vjudge5 A Feb. 24, 2019, 2:57 a.m. OK MS C++ TESTS 50 249 13516800 1600
50997457 vjudge1 A March 8, 2019, 4:54 a.m. OK MS C++ TESTS 50 249 16793600 1600
50415339 vjudge4 A Feb. 24, 2019, 6:13 a.m. OK MS C++ TESTS 50 295 13209600 1600
50003366 BaturaDima A Feb. 16, 2019, 4:48 p.m. OK MS C++ TESTS 50 358 10240000 1600
52433063 vjudge2 A April 7, 2019, 1:06 a.m. OK MS C++ TESTS 50 390 12492800 1600
50083817 tangbinjie A Feb. 18, 2019, 6:15 a.m. OK MS C++ 2017 TESTS 50 109 9625600 1600
50738001 wellox A March 3, 2019, 1:50 p.m. OK MS C++ 2017 TESTS 50 234 9625600 1600
50737564 wellox A March 3, 2019, 1:38 p.m. OK MS C++ 2017 TESTS 50 234 9625600 1600
53097832 wisest A April 21, 2019, 2:35 p.m. OK MS C++ 2017 TESTS 50 280 8396800 1600
50217595 jhoowy A Feb. 20, 2019, 5:42 a.m. OK MS C++ 2017 TESTS 50 280 10547200 1600
53097419 wisest A April 21, 2019, 2:21 p.m. OK MS C++ 2017 TESTS 50 280 10854400 1600
50039379 nomiku99 A Feb. 16, 2019, 11:56 p.m. OK MS C++ 2017 TESTS 50 295 19353600 1600
66951210 yuanyuan2048 A Dec. 15, 2019, 9:54 a.m. OK MS C++ 2017 TESTS 50 296 26419200 1600
50039490 nomiku99 A Feb. 17, 2019, 12:04 a.m. OK MS C++ 2017 TESTS 50 312 19353600 1600
52463937 SendThemToHell A April 7, 2019, 2:37 p.m. OK MS C++ 2017 TESTS 50 405 10240000 1600
57239461 reyad A July 17, 2019, 4:46 p.m. OK Node.js TESTS 50 343 56422400 1600
50005695 pajenegod A Feb. 16, 2019, 4:53 p.m. OK PyPy 2 TESTS 50 202 24473600 1600
51207832 soumyasarkar1998 A March 12, 2019, 6:04 a.m. OK PyPy 2 TESTS 50 280 26214400 1600
56409668 kabeer27 A July 1, 2019, 10:12 p.m. OK PyPy 2 TESTS 50 311 31641600 1600
65928313 lowoncode A Nov. 28, 2019, 7:27 p.m. OK PyPy 3 TESTS 50 358 29593600 1600
50000606 meooow A Feb. 16, 2019, 4:42 p.m. OK PyPy 3 TESTS 50 404 34406400 1600
69705465 Gleb_Dubosarskii A Jan. 29, 2020, 4:16 a.m. OK PyPy 3 TESTS 50 405 26316800 1600
65759138 AvinashKartik A Nov. 26, 2019, 3:08 p.m. OK PyPy 3 TESTS 50 405 31641600 1600
58565829 codeboy5 A Aug. 11, 2019, 7:51 a.m. OK PyPy 3 TESTS 50 420 28672000 1600
68981966 adivannik A Jan. 17, 2020, 11:05 a.m. OK PyPy 3 TESTS 50 420 32563200 1600
50343413 homoeconomicus A Feb. 23, 2019, 4:41 a.m. OK PyPy 3 TESTS 50 420 36044800 1600
50042918 conjecture_xyz A Feb. 17, 2019, 3:36 a.m. OK PyPy 3 TESTS 50 420 38912000 1600
57069099 saku7 A July 15, 2019, 1:22 a.m. OK PyPy 3 TESTS 50 467 33075200 1600
57018982 kopok2 A July 14, 2019, 1:02 p.m. OK PyPy 3 TESTS 50 670 73216000 1600
50000214 nwi A Feb. 16, 2019, 4:41 p.m. OK Python 2 TESTS 50 405 16588800 1600
51081332 ashok123 A March 9, 2019, 11:24 a.m. OK Python 2 TESTS 50 483 18022400 1600
50049025 OpalDshawn A Feb. 17, 2019, 7:18 a.m. OK Python 2 TESTS 50 498 18022400 1600
51902579 Nika86 A March 27, 2019, 2:03 p.m. OK Python 2 TESTS 50 608 17817600 1600
51561188 lnever A March 20, 2019, 8 a.m. OK Python 2 TESTS 50 686 59494400 1600
54888093 Black_Fregat A May 31, 2019, 6:35 p.m. OK Python 3 TESTS 50 358 21094400 1600
67151238 Annvv A Dec. 18, 2019, 10:52 a.m. OK Python 3 TESTS 50 405 20889600 1600
50098266 sdhd A Feb. 18, 2019, 1:45 p.m. OK Python 3 TESTS 50 467 20787200 1600
52243784 codershuvo A April 2, 2019, 5:57 p.m. OK Python 3 TESTS 50 467 21606400 1600
50345972 iamssk A Feb. 23, 2019, 6:21 a.m. OK Python 3 TESTS 50 467 22630400 1600
67151099 Annvv A Dec. 18, 2019, 10:49 a.m. OK Python 3 TESTS 50 482 20889600 1600
68970057 nealzane A Jan. 17, 2020, 6:39 a.m. OK Python 3 TESTS 50 483 24576000 1600
50244327 beemax A Feb. 20, 2019, 2:13 p.m. OK Python 3 TESTS 50 483 25804800 1600
50093646 petushny A Feb. 18, 2019, 11:43 a.m. OK Python 3 TESTS 50 498 20889600 1600
55584947 spellstaker A June 15, 2019, 8:57 a.m. OK Python 3 TESTS 50 499 35225600 1600

remove filters

Back to search problems