Codeforces Round 526 (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
1083 Codeforces Round 526 (Div. 1) FINISHED False 7200 187363499 Dec. 10, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 277 ) F The Fair Nut and Amusing Xor PROGRAMMING data structures 3100

B"The Fair Nut has two arrays a and b , consisting of n numbers. He found them so long ago that no one knows when they came to him. The Fair Nut often changes numbers in his arrays. He also is interested in how similar a and b are after every modification. Let's denote similarity of two arrays as the minimum number of operations to apply to make arrays equal (every operation can be applied for both arrays). If it is impossible, similarity will be equal -1 . Per one operation you can choose a subarray with length k ( k is fixed), and change every element a_i , which belongs to the chosen subarray, to a_i oplus x ( x can be chosen), where oplus denotes the bitwise XOR operation. Nut has already calculated the similarity of the arrays after every modification. Can you do it? Note that you just need to calculate those values, that is you do not need to apply any operations. The first line contains three numbers n , k and q ( 1 <= k <= n <= 2 cdot 10^5 , 0 <= q <= 2 cdot 10^5 ) -- the length of the arrays, the length of the subarrays, to which the operations are applied, and the number of queries. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i < 2^{14} ) -- elements of array a . The third line contains n integers b_1, b_2, ldots, b_n ( 0 <= b_i < 2^{14} ) -- elements of array b . Each of the next q lines describes query and contains string s and two integers p and v ( 1 <= p <= n , 0 <= v < 2^{14} ) -- array, which this query changes ( xc2 xaba xc2 xbb or xc2 xabb xc2 xbb without quotes), index of changing element and its new value. On the first line print initial similarity of arrays a and b . On the i -th of following q lines print similarity of a and b after applying first i modifications. In the first sample making arrays [0, 4, "...

Tutorials

63753

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46934642 duxing201606 F Dec. 12, 2018, 1:17 p.m. OK GNU C++11 TESTS 76 1512 24678400 3100
55852719 asdfghjk F June 21, 2019, 5:08 a.m. OK GNU C++11 TESTS 76 1762 89395200 3100
46902490 yasugongshang F Dec. 11, 2018, 12:38 p.m. OK GNU C++11 TESTS 76 1778 46796800 3100
47240882 zhouyuyang F Dec. 19, 2018, 1:30 a.m. OK GNU C++11 TESTS 76 1809 46796800 3100
55716882 wh_bestwyj F June 18, 2019, 1:10 p.m. OK GNU C++11 TESTS 76 1902 73523200 3100
47676408 Big_black_jujube F Dec. 29, 2018, 9:23 a.m. OK GNU C++11 TESTS 76 1949 37171200 3100
47319984 x_faraway_x F Dec. 21, 2018, 7:04 a.m. OK GNU C++11 TESTS 76 1949 40755200 3100
66542439 yinghua1314 F Dec. 9, 2019, 12:02 p.m. OK GNU C++11 TESTS 76 2012 46796800 3100
47315866 x_faraway_x F Dec. 21, 2018, 3:20 a.m. OK GNU C++11 TESTS 76 2027 40755200 3100
47676532 Big_black_jujube F Dec. 29, 2018, 9:28 a.m. OK GNU C++11 TESTS 76 2043 37171200 3100
46911661 abeker F Dec. 11, 2018, 5:17 p.m. OK GNU C++14 TESTS 76 1357 32563200 3100
48655238 ReaLNero1 F Jan. 21, 2019, 2:08 a.m. OK GNU C++14 TESTS 76 1404 66969600 3100
46998239 djq_cpp F Dec. 14, 2018, 9:56 a.m. OK GNU C++14 TESTS 76 1435 67276800 3100
66190303 latte0119 F Dec. 2, 2019, 4:08 p.m. OK GNU C++14 TESTS 76 1496 50790400 3100
46992493 mehul1999k F Dec. 14, 2018, 5:51 a.m. OK GNU C++14 TESTS 76 1684 38400000 3100
60162074 Scut82 F Sept. 6, 2019, 9:22 a.m. OK GNU C++14 TESTS 76 1793 75366400 3100
46868384 kiwikiwi F Dec. 10, 2018, 5:23 p.m. OK GNU C++14 TESTS 76 1824 38400000 3100
46934792 tmwilliamlin168 F Dec. 12, 2018, 1:20 p.m. OK GNU C++14 TESTS 76 1872 58163200 3100
46934770 tmwilliamlin168 F Dec. 12, 2018, 1:20 p.m. OK GNU C++14 TESTS 76 1887 49459200 3100
60153803 Scut82 F Sept. 6, 2019, 5:39 a.m. OK GNU C++14 TESTS 76 1902 52940800 3100
51573356 maroonrk F March 20, 2019, 12:16 p.m. OK GNU C++17 TESTS 76 1528 56320000 3100
47095793 Nakagawa.Kanon F Dec. 16, 2018, 8:22 a.m. OK GNU C++17 TESTS 76 1590 25292800 3100
47034269 TsotneNatroshvili F Dec. 15, 2018, 11:29 a.m. OK GNU C++17 TESTS 76 1809 38400000 3100
64039383 gustavohb F Nov. 1, 2019, 5:35 p.m. OK GNU C++17 TESTS 76 1934 49459200 3100
49950392 Kmcode F Feb. 15, 2019, 1:48 p.m. OK GNU C++17 TESTS 76 2059 75673600 3100
47856474 mostafa.essam F Jan. 2, 2019, 11:04 p.m. OK GNU C++17 TESTS 76 2090 43212800 3100
52260345 vjudge1 F April 3, 2019, 8:26 a.m. OK GNU C++17 TESTS 76 2152 74444800 3100
52260332 Christopher_Liu F April 3, 2019, 8:25 a.m. OK GNU C++17 TESTS 76 2152 74444800 3100
49950404 Kmcode F Feb. 15, 2019, 1:48 p.m. OK GNU C++17 TESTS 76 2167 70758400 3100
62405104 disposrestfuIly F Oct. 12, 2019, 8:43 a.m. OK GNU C++17 TESTS 76 2167 109158400 3100

remove filters

Back to search problems