Codeforces Round 626 (Div. 1, based on Moscow Open Olympiad in Informatics)

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
1322 Codeforces Round 626 (Div. 1, based on Moscow Open Olympiad in Informatics) FINISHED False 7200 153779111 March 7, 2020, 9:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4288 ) B Present PROGRAMMING binary search bitmasks constructive algorithms data structures math sortings

B"Catherine received an array of integers as a gift for March 8. Eventually she grew bored with it, and she started calculated various useless characteristics for it. She succeeded to do it for each one she came up with. But when she came up with another one -- xor of all pairwise sums of elements in the array, she realized that she couldn't compute it for a very large array, thus she asked for your help. Can you do it? Formally, you need to compute (a_1 + a_2) oplus (a_1 + a_3) oplus ldots oplus (a_1 + a_n) oplus (a_2 + a_3) oplus ldots oplus (a_2 + a_n) ldots oplus (a_{n-1} + a_n) Here x oplus y is a bitwise XOR operation (i.e. x ^ y in many modern programming languages). You can read about it in Wikipedia: https://en.wikipedia.org/wiki/Exclusive_or#Bitwise_operation. The first line contains a single integer n ( 2 <= q n <= q 400 ,000 ) -- the number of integers in the array. The second line contains integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 10^7 ). Print a single integer -- xor of all pairwise sums of integers in the given array. In the first sample case there is only one sum 1 + 2 = 3 . In the second sample case there are three sums: 1 + 2 = 3 , 1 + 3 = 4 , 2 + 3 = 5 . In binary they are represented as 011_2 oplus 100_2 oplus 101_2 = 010_2 , thus the answer is 2. oplus is the bitwise xor operation. To define x oplus y , consider binary representations of integers x and y . We put the i -th bit of the result to be 1 when exactly one of the i -th bits of x and y is 1. Otherwise, the i -th bit of the result is put to be 0. For example, 0101_2 , oplus , 0011_2 = 0110_2 . "...

Tutorials

Codeforces Round #626 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
72644861 Gassa B March 7, 2020, 10:29 a.m. OK D TESTS 54 967 16998400
72638726 physics0523 B March 7, 2020, 10:06 a.m. OK GNU C11 TESTS 54 2168 8396800
72639861 msuwakow B March 7, 2020, 10:10 a.m. OK GNU C++11 TESTS 54 156 4915200
72657167 jxdxhy B March 7, 2020, 11:27 a.m. OK GNU C++11 TESTS 54 171 69939200
72637648 Isonan B March 7, 2020, 10:02 a.m. OK GNU C++11 TESTS 54 187 7884800
72645082 2018szb B March 7, 2020, 10:30 a.m. OK GNU C++11 TESTS 54 202 6451200
72645226 command_block B March 7, 2020, 10:30 a.m. OK GNU C++11 TESTS 54 218 4608000
72645954 tender_green B March 7, 2020, 10:33 a.m. OK GNU C++11 TESTS 54 233 6348800
72633350 cuizhuyefei B March 7, 2020, 9:47 a.m. OK GNU C++11 TESTS 54 249 7168000
72638003 ztc_dot B March 7, 2020, 10:03 a.m. OK GNU C++11 TESTS 54 249 68710400
72639588 wzp666 B March 7, 2020, 10:09 a.m. OK GNU C++11 TESTS 54 264 68812800
72640837 142857 B March 7, 2020, 10:13 a.m. OK GNU C++11 TESTS 54 264 69222400
72642456 Lily B March 7, 2020, 10:20 a.m. OK GNU C++14 TESTS 54 202 12185600
72648424 Anus1373 B March 7, 2020, 10:44 a.m. OK GNU C++14 TESTS 54 233 6451200
72650244 Svyat B March 7, 2020, 10:52 a.m. OK GNU C++14 TESTS 54 234 6144000
72661351 aaaaajack B March 7, 2020, 12:28 p.m. OK GNU C++14 TESTS 54 249 3174400
72644651 Torta B March 7, 2020, 10:28 a.m. OK GNU C++14 TESTS 54 249 3174400
72636092 inaFSTream B March 7, 2020, 9:56 a.m. OK GNU C++14 TESTS 54 249 7475200
72665612 KisekiPurin2019 B March 7, 2020, 1:27 p.m. OK GNU C++14 TESTS 54 249 12800000
72645325 PureWhite B March 7, 2020, 10:31 a.m. OK GNU C++14 TESTS 54 264 9625600
72637471 OYJason B March 7, 2020, 10:01 a.m. OK GNU C++14 TESTS 54 264 26419200
72635442 yhx-12243 B March 7, 2020, 9:54 a.m. OK GNU C++14 TESTS 54 264 68812800
72639503 Timur_Sitdikov B March 7, 2020, 10:09 a.m. OK GNU C++17 TESTS 54 171 4812800
72651055 Fefer_Ivan B March 7, 2020, 10:56 a.m. OK GNU C++17 TESTS 54 218 5632000
72633727 mnbvmar B March 7, 2020, 9:48 a.m. OK GNU C++17 TESTS 54 249 3174400
72635247 square1001 B March 7, 2020, 9:53 a.m. OK GNU C++17 TESTS 54 249 4812800
72696802 rama_pang B March 8, 2020, 12:26 a.m. OK GNU C++17 TESTS 54 265 3174400
72659184 sysulby B March 7, 2020, 11:34 a.m. OK GNU C++17 TESTS 54 265 3174400
72645980 sincerity B March 7, 2020, 10:33 a.m. OK GNU C++17 TESTS 54 265 6451200
72636944 BigBag B March 7, 2020, 9:59 a.m. OK GNU C++17 TESTS 54 265 8806400
72636299 LayCurse B March 7, 2020, 9:57 a.m. OK GNU C++17 TESTS 54 265 103116800
72638209 Cyanic B March 7, 2020, 10:04 a.m. OK GNU C++17 TESTS 54 296 10752000
72635098 uwi B March 7, 2020, 9:53 a.m. OK Java 11 TESTS 54 389 307200
72662794 Arya_Erin B March 7, 2020, 12:46 p.m. OK Java 11 TESTS 54 2714 41267200
72694888 Hemose B March 7, 2020, 11:26 p.m. OK Java 11 TESTS 54 2885 5427200
72639505 cwise B March 7, 2020, 10:09 a.m. OK Java 8 TESTS 54 592 45363200
72641053 qwerty787788 B March 7, 2020, 10:14 a.m. OK Java 8 TESTS 54 1356 81203200
72696349 ijxjdjd B March 7, 2020, 11:57 p.m. OK Java 8 TESTS 54 1638 395059200
72651467 SecondThread B March 7, 2020, 10:58 a.m. OK Java 8 TESTS 54 2277 273715200
72648023 DarLam B March 7, 2020, 10:42 a.m. OK Java 8 TESTS 54 2714 14131200
72648670 Tlatoani B March 7, 2020, 10:45 a.m. OK Kotlin TESTS 54 1216 236851200
72654203 Sergey.Bankevich B March 7, 2020, 11:11 a.m. OK Kotlin TESTS 54 1590 16793600
72641950 math957963 B March 7, 2020, 10:18 a.m. OK MS C++ TESTS 54 858 4710400
72650162 gnomina007 B March 7, 2020, 10:52 a.m. OK MS C++ 2017 TESTS 54 1107 13107200
72656151 vpike B March 7, 2020, 11:22 a.m. OK MS C++ 2017 TESTS 54 1122 134758400
72642255 Alexandr_TS B March 7, 2020, 10:19 a.m. OK MS C++ 2017 TESTS 54 1232 277811200
72653355 pichulia B March 7, 2020, 11:07 a.m. OK MS C++ 2017 TESTS 54 1778 103526400
72638208 bcollet B March 7, 2020, 10:04 a.m. OK PyPy 2 TESTS 54 1996 34918400
72657957 neterukun B March 7, 2020, 11:30 a.m. OK PyPy 3 TESTS 54 2620 47923200
72638053 sansen B March 7, 2020, 10:03 a.m. OK Rust TESTS 54 233 6553600

remove filters

Back to search problems