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 |
---|---|---|---|---|---|---|
1665 | Codeforces Round 781 (Div. 2) | FINISHED | False | 7200 | 87837863 | April 8, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1565 ) | E | MinimizOR | PROGRAMMING | binary search bitmasks data structures dp greedy implementation |
B"You are given an array a of n non-negative integers, numbered from 1 to n . Let's define the cost of the array a as displaystyle min_{i neq j} a_i | a_j , where | denotes the bitwise OR operation. There are q queries. For each query you are given two integers l and r ( l < r ). For each query you should find the cost of the subarray a_{l}, a_{l + 1}, ldots, a_{r} . Each test case consists of several test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains an integer n ( 2 <= n <= 10^5 ) -- the length array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i < 2^{30} ) -- the elements of a . The third line of each test case contains an integer q ( 1 <= q <= 10^5 ) -- the number of queries. Each of the next q lines contains two integers l_j , r_j ( 1 <= l_j < r_j <= n ) -- the description of the j -th query. It is guaranteed that the sum of n and the sum of q over all test cases do not exceed 10^5 . For each test case print q numbers, where the j -th number is the cost of array a_{l_j}, a_{l_j + 1}, ldots, a_{r_j} . In the first test case the array a is 110_2, 001_2, 011_2, 010_2, 001_2 . That's why the answers for the queries are: In the second test case the array a is 00_2, 10_2, 01_2, underbrace{11 ldots 1_2}_{30} ( a_4 = 2^{30} - 1 ). That's why the answers for the queries are: "... |
Codeforces Round #781 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
153106381 | BARBARIANNNNN | E | April 9, 2022, 3:05 a.m. | OK | GNU C++14 | TESTS | 81 | 186 | 50688000 | ||
153074213 | dlalswp25 | E | April 8, 2022, 5:02 p.m. | OK | GNU C++14 | TESTS | 80 | 233 | 39833600 | ||
153068956 | PurpleFatWolf | E | April 8, 2022, 4:25 p.m. | OK | GNU C++14 | TESTS | 80 | 264 | 122675200 | ||
153078927 | applese | E | April 8, 2022, 5:37 p.m. | OK | GNU C++14 | TESTS | 81 | 311 | 78950400 | ||
153101211 | kaiming_xxy | E | April 9, 2022, 12:36 a.m. | OK | GNU C++14 | TESTS | 81 | 342 | 39424000 | ||
153105580 | refresh888 | E | April 9, 2022, 2:45 a.m. | OK | GNU C++14 | TESTS | 81 | 358 | 52940800 | ||
153102891 | tan900 | E | April 9, 2022, 1:27 a.m. | OK | GNU C++14 | TESTS | 81 | 358 | 121856000 | ||
153102745 | Zimse_ | E | April 9, 2022, 1:22 a.m. | OK | GNU C++14 | TESTS | 81 | 358 | 242073600 | ||
153082865 | meyi | E | April 8, 2022, 6:21 p.m. | OK | GNU C++14 | TESTS | 81 | 451 | 16179200 | ||
153071709 | shijiuwan | E | April 8, 2022, 4:32 p.m. | OK | GNU C++14 | TESTS | 80 | 452 | 48844800 | ||
153083934 | yayy | E | April 8, 2022, 6:35 p.m. | OK | GNU C++17 | TESTS | 81 | 249 | 146329600 | ||
153065222 | liouzhou_101 | E | April 8, 2022, 4:13 p.m. | OK | GNU C++17 | TESTS | 80 | 264 | 77619200 | ||
153106025 | kimoyami | E | April 9, 2022, 2:56 a.m. | OK | GNU C++17 | TESTS | 81 | 280 | 49152000 | ||
153068678 | OMG_wc | E | April 8, 2022, 4:24 p.m. | OK | GNU C++17 | TESTS | 80 | 280 | 63897600 | ||
153083947 | yayy | E | April 8, 2022, 6:35 p.m. | OK | GNU C++17 | TESTS | 81 | 280 | 146329600 | ||
153093962 | YahiaSherif | E | April 8, 2022, 9:22 p.m. | OK | GNU C++17 | TESTS | 81 | 343 | 99532800 | ||
153106284 | huxch135 | E | April 9, 2022, 3:02 a.m. | OK | GNU C++17 | TESTS | 81 | 420 | 38912000 | ||
153102023 | yyyz04 | E | April 9, 2022, 1 a.m. | OK | GNU C++17 | TESTS | 81 | 420 | 253542400 | ||
153083328 | LeoRiether | E | April 8, 2022, 6:27 p.m. | OK | GNU C++17 | TESTS | 81 | 436 | 24883200 | ||
153084970 | teraqqq | E | April 8, 2022, 6:50 p.m. | OK | GNU C++17 | TESTS | 81 | 467 | 7782400 | ||
153106006 | CharlesWuQiushi | E | April 9, 2022, 2:55 a.m. | OK | GNU C++17 (64) | TESTS | 81 | 186 | 193228800 | ||
153074947 | willy108 | E | April 8, 2022, 5:05 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 187 | 145920000 | ||
153083907 | yayy | E | April 8, 2022, 6:35 p.m. | OK | GNU C++17 (64) | TESTS | 81 | 202 | 145920000 | ||
153106762 | OMG_wc | E | April 9, 2022, 3:14 a.m. | OK | GNU C++17 (64) | TESTS | 81 | 264 | 65433600 | ||
153071860 | syksykCCC | E | April 8, 2022, 4:32 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 405 | 39321600 | ||
153106926 | 1127193030 | E | April 9, 2022, 3:17 a.m. | OK | GNU C++17 (64) | TESTS | 81 | 452 | 18329600 | ||
153106604 | 1127193030 | E | April 9, 2022, 3:10 a.m. | OK | GNU C++17 (64) | TESTS | 81 | 452 | 18329600 | ||
153108789 | vjudge1 | E | April 9, 2022, 3:58 a.m. | OK | GNU C++17 (64) | TESTS | 81 | 452 | 40345600 | ||
153099369 | Knowledge_Pig | E | April 8, 2022, 11:46 p.m. | OK | GNU C++17 (64) | TESTS | 81 | 452 | 260608000 | ||
153108774 | xiece666 | E | April 9, 2022, 3:58 a.m. | OK | GNU C++17 (64) | TESTS | 81 | 467 | 40345600 | ||
153102299 | return20071007 | E | April 9, 2022, 1:09 a.m. | OK | GNU C++20 (64) | TESTS | 81 | 140 | 38912000 | ||
153070050 | ilovetst | E | April 8, 2022, 4:28 p.m. | OK | GNU C++20 (64) | TESTS | 80 | 155 | 82329600 | ||
153071822 | magamed228 | E | April 8, 2022, 4:32 p.m. | OK | GNU C++20 (64) | TESTS | 80 | 171 | 38092800 | ||
153066234 | misaka18931 | E | April 8, 2022, 4:16 p.m. | OK | GNU C++20 (64) | TESTS | 80 | 171 | 121241600 | ||
153083687 | yayy | E | April 8, 2022, 6:32 p.m. | OK | GNU C++20 (64) | TESTS | 81 | 171 | 145920000 | ||
153083895 | yayy | E | April 8, 2022, 6:35 p.m. | OK | GNU C++20 (64) | TESTS | 81 | 187 | 145920000 | ||
153106084 | vjudge4 | E | April 9, 2022, 2:57 a.m. | OK | GNU C++20 (64) | TESTS | 81 | 218 | 193126400 | ||
153103814 | SharpnessX | E | April 9, 2022, 1:58 a.m. | OK | GNU C++20 (64) | TESTS | 81 | 233 | 53248000 | ||
153067521 | flukehn | E | April 8, 2022, 4:20 p.m. | OK | GNU C++20 (64) | TESTS | 80 | 249 | 145510400 | ||
153076297 | Nea1 | E | April 8, 2022, 5:14 p.m. | OK | GNU C++20 (64) | TESTS | 81 | 295 | 26521600 | ||
153083146 | r57shell | E | April 8, 2022, 6:24 p.m. | OK | MS C++ 2017 | TESTS | 81 | 1372 | 78028800 | ||
153086898 | machine_solution | E | April 8, 2022, 7:21 p.m. | OK | MS C++ 2017 | TESTS | 81 | 2027 | 113664000 | ||
153087871 | hxu10 | E | April 8, 2022, 7:37 p.m. | OK | PyPy 2 | TESTS | 81 | 2714 | 261632000 | ||
153086121 | eepsilon | E | April 8, 2022, 7:08 p.m. | OK | PyPy 3 | TESTS | 81 | 1310 | 58572800 | ||
153087908 | hxu10 | E | April 8, 2022, 7:37 p.m. | OK | PyPy 3 | TESTS | 81 | 2495 | 265728000 | ||
153074016 | sansen | E | April 8, 2022, 5:01 p.m. | OK | Rust 2021 | TESTS | 80 | 561 | 21094400 |
Back to search problems