Codeforces Round 532 (Div. 2)

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
1100 Codeforces Round 532 (Div. 2) FINISHED False 7200 184433099 Jan. 13, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2497 ) F Ivan and Burgers PROGRAMMING data structures divide and conquer greedy math 2600

B"Ivan loves burgers and spending money. There are n burger joints on the street where Ivan lives. Ivan has q friends, and the i -th friend suggested to meet at the joint l_i and walk to the joint r_i (l_i <= q r_i) . While strolling with the i -th friend Ivan can visit all joints x which satisfy l_i <= q x <= q r_i . For each joint Ivan knows the cost of the most expensive burger in it, it costs c_i burles. Ivan wants to visit some subset of joints on his way, in each of them he will buy the most expensive burger and spend the most money. But there is a small issue: his card broke and instead of charging him for purchases, the amount of money on it changes as follows. If Ivan had d burles before the purchase and he spent c burles at the joint, then after the purchase he would have d oplus c burles, where oplus denotes the bitwise XOR operation. Currently Ivan has 2^{2^{100}} - 1 burles and he wants to go out for a walk. Help him to determine the maximal amount of burles he can spend if he goes for a walk with the friend i . The amount of burles he spends is defined as the difference between the initial amount on his account and the final account. The first line contains one integer n ( 1 <= q n <= q 500 ,000 ) -- the number of burger shops. The next line contains n integers c_1, c_2, ldots, c_n ( 0 <= q c_i <= q 10^6 ), where c_i -- the cost of the most expensive burger in the burger joint i . The third line contains one integer q ( 1 <= q q <= q 500 ,000 ) -- the number of Ivan's friends. Each of the next q lines contain two integers l_i and r_i ( 1 <= q l_i <= q r_i <= q n ) -- pairs of numbers of burger shops between which Ivan will walk. Output q lines, i -th of which containing the maximum amount of money Ivan can spend with the friend i . In the first test, in order to s"...

Tutorials

Unofficial Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50159622 libra8z F Feb. 19, 2019, 11:59 a.m. OK GNU C11 TESTS 139 2027 84172800 2600
50159554 libra8z F Feb. 19, 2019, 11:57 a.m. OK GNU C11 TESTS 139 2027 84172800 2600
48366946 rainboy F Jan. 13, 2019, 11:25 p.m. OK GNU C11 TESTS 139 2901 14233600 2600
48366864 rainboy F Jan. 13, 2019, 11:19 p.m. OK GNU C11 TESTS 139 2932 14233600 2600
48366796 rainboy F Jan. 13, 2019, 11:12 p.m. OK GNU C11 TESTS 139 2994 10035200 2600
48366674 rainboy F Jan. 13, 2019, 11:03 p.m. OK GNU C11 TESTS 139 2995 10035200 2600
48930835 phantomI F Jan. 25, 2019, 12:27 p.m. OK GNU C++11 TESTS 139 186 10137600 2600
48551155 luogu_bot2 F Jan. 19, 2019, 1:53 a.m. OK GNU C++11 TESTS 139 187 9830400 2600
48551224 luogu_bot1 F Jan. 19, 2019, 1:57 a.m. OK GNU C++11 TESTS 139 202 9830400 2600
57920445 yzh666 F July 29, 2019, 4:29 a.m. OK GNU C++11 TESTS 139 218 10137600 2600
49455099 Cyhlnj F Feb. 4, 2019, 9:46 a.m. OK GNU C++11 TESTS 139 218 24268800 2600
48367146 Ez3qwq F Jan. 13, 2019, 11:47 p.m. OK GNU C++11 TESTS 139 233 252723200 2600
48369886 _Dispwnl F Jan. 14, 2019, 3:13 a.m. OK GNU C++11 TESTS 139 249 10035200 2600
50556950 foreverlasting F Feb. 27, 2019, 8:34 a.m. OK GNU C++11 TESTS 139 249 10035200 2600
51028416 IIIOOOIII F March 8, 2019, 12:29 p.m. OK GNU C++11 TESTS 139 249 10035200 2600
56043318 tyler178 F June 25, 2019, 3:21 p.m. OK GNU C++11 TESTS 139 249 10035200 2600
48367349 HatsuneMikuo F Jan. 14, 2019, 12:05 a.m. OK GNU C++14 TESTS 139 233 13004800 2600
48366872 tmwilliamlin168 F Jan. 13, 2019, 11:19 p.m. OK GNU C++14 TESTS 139 233 13004800 2600
55065782 __Ressed__ F June 4, 2019, 3:28 a.m. OK GNU C++14 TESTS 139 233 28262400 2600
48405052 neal F Jan. 15, 2019, 2:43 a.m. OK GNU C++14 TESTS 139 264 19865600 2600
48405002 neal F Jan. 15, 2019, 2:39 a.m. OK GNU C++14 TESTS 139 265 19865600 2600
48360113 tokitsukaze F Jan. 13, 2019, 6:16 p.m. OK GNU C++14 TESTS 139 280 10137600 2600
48405105 neal F Jan. 15, 2019, 2:46 a.m. OK GNU C++14 TESTS 139 295 19865600 2600
48354007 Maestrale F Jan. 13, 2019, 4:16 p.m. OK GNU C++14 TESTS 139 311 10137600 2600
58894163 qiyue F Aug. 16, 2019, 6:53 a.m. OK GNU C++14 TESTS 139 342 150323200 2600
69081171 vjudge4 F Jan. 19, 2020, 6:28 a.m. OK GNU C++14 TESTS 139 343 80179200 2600
48654292 ReaLNero1 F Jan. 21, 2019, 1:27 a.m. OK GNU C++17 TESTS 139 171 35635200 2600
48384096 PDDNB F Jan. 14, 2019, 12:02 p.m. OK GNU C++17 TESTS 139 202 35635200 2600
48363242 Liwj F Jan. 13, 2019, 7:45 p.m. OK GNU C++17 TESTS 139 264 30310400 2600
48406343 201530800126 F Jan. 15, 2019, 4:09 a.m. OK GNU C++17 TESTS 139 483 10240000 2600
48414336 ZhihuiLiu F Jan. 15, 2019, 9:30 a.m. OK GNU C++17 TESTS 139 483 10240000 2600
48369310 sys. F Jan. 14, 2019, 2:33 a.m. OK GNU C++17 TESTS 139 483 10240000 2600
48362216 Liwj F Jan. 13, 2019, 7:13 p.m. OK GNU C++17 TESTS 139 483 10240000 2600
48371678 vjudge2 F Jan. 14, 2019, 4:51 a.m. OK GNU C++17 TESTS 139 483 10240000 2600
57592280 stArliGht F July 23, 2019, 12:41 p.m. OK GNU C++17 TESTS 139 498 10035200 2600
57751179 S.K F July 25, 2019, 2:50 p.m. OK GNU C++17 TESTS 139 498 10035200 2600
48352261 uwi F Jan. 13, 2019, 4:05 p.m. OK Java 8 TESTS 139 1372 145203200 2600
48366945 Dukkha F Jan. 13, 2019, 11:25 p.m. OK Java 8 TESTS 139 1699 29798400 2600
49074490 Harpae F Jan. 28, 2019, 1:20 a.m. OK Java 8 TESTS 139 1793 127078400 2600
48366865 Dukkha F Jan. 13, 2019, 11:19 p.m. OK Java 8 TESTS 139 1824 29081600 2600
48366673 Dukkha F Jan. 13, 2019, 11:03 p.m. OK Java 8 TESTS 139 1902 24678400 2600
48366553 Dukkha F Jan. 13, 2019, 10:53 p.m. OK Java 8 TESTS 139 2199 24678400 2600
66638443 dalt F Dec. 11, 2019, 1:49 p.m. OK Java 8 TESTS 139 2760 50073600 2600
57587206 vjudge4 F July 23, 2019, 11:05 a.m. OK MS C++ TESTS 139 452 10035200 2600
57640700 qcwlmqy F July 24, 2019, 12:31 p.m. OK MS C++ TESTS 139 499 82124800 2600
57841038 vjudge3 F July 27, 2019, 9:18 a.m. OK MS C++ TESTS 139 2168 130252800 2600
57587451 vjudge4 F July 23, 2019, 11:11 a.m. OK MS C++ TESTS 139 2963 14028800 2600
48362138 rustaurance F Jan. 13, 2019, 7:10 p.m. OK Rust TESTS 139 404 27852800 2600
65685720 sansen F Nov. 24, 2019, 11:03 p.m. OK Rust TESTS 139 2042 108236800 2600
65685806 sansen F Nov. 24, 2019, 11:09 p.m. OK Rust TESTS 139 2120 108236800 2600

remove filters

Back to search problems