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 |
---|---|---|---|---|---|---|
1004 | Codeforces Round 495 (Div. 2) | FINISHED | False | 7200 | 206717123 | July 5, 2018, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 778 ) | F | Sonya and Bitwise OR | PROGRAMMING | bitmasks data structures divide and conquer | 2900 |
B'Sonya has an array a_1, a_2, ldots, a_n consisting of n integers and also one non-negative integer x . She has to perform m queries of two types: Can you help Sonya perform all her queries? Bitwise OR is a binary operation on a pair of non-negative integers. To calculate the bitwise OR of two numbers, you need to write both numbers in binary notation. The result is a number, in binary, which contains a one in each digit if there is a one in the binary notation of at least one of the two numbers. For example, 10 OR 19 = 1010_2 OR 10011_2 = 11011_2 = 27 . The first line contains three integers n , m , and x ( 1 <= q n, m <= q 10^5 , 0 <= q x<2^{20} ) -- the number of numbers, the number of queries, and the constant for all queries. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= q a_i<2^{20} ) -- numbers of the array. The following m lines each describe an query. A line has one of the following formats: For each query of type 2, print the number of subarrays such that the bitwise OR of all the numbers in the range is at least x . In the first example, there are an array [ 0 , 3 , 6 , 1 ] and queries: In the second example, there are an array [ 6 , 0 , 3 , 15 , 2 ] are queries: '... |
60443 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
40003848 | atadam | F | July 5, 2018, 6:08 p.m. | OK | GNU C++ | TESTS | 45 | 1544 | 114278400 | 2900 | |
40001175 | EZ_fwtt08 | F | July 5, 2018, 5:40 p.m. | OK | GNU C++11 | TESTS | 45 | 654 | 70553600 | 2900 |
Back to search problems