Codeforces Round 882 (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
1847 Codeforces Round 882 (Div. 2) FINISHED False 8100 48525863 July 6, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 928 ) F The Boss's Identity PROGRAMMING binary search bitmasks data structures dfs and similar greedy math sortings

B"While tracking Diavolo's origins, Giorno receives a secret code from Polnareff. The code can be represented as an infinite sequence of positive integers: a_1, a_2, ... . Giorno immediately sees the pattern behind the code. The first n numbers a_1, a_2, ... , a_n are given. For i > n the value of a_i is (a_{i-n} | a_{i-n+1}) , where | denotes the bitwise OR operator. Pieces of information about Diavolo are hidden in q questions. Each question has a positive integer v associated with it and its answer is the smallest index i such that a_i > v . If no such i exists, the answer is -1 . Help Giorno in answering the questions! Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10 ,000 ). The description of the test cases follows. The first line of each test case contains two integers n and q ( 2 <= q n <= q 2 cdot 10^5 , 1 <= q q <= q 2 cdot 10^5 ). The second line of each test case contains n integers a_1,a_2, ldots,a_n ( 0 <= q a_i <= q 10^9 ) -- the parts of the code which define the pattern. The i -th line of the next q lines contain a single integer v_i ( 0 <= q v_i <= q 10^9 ) -- the question Giorno asks you. The sum of n and q over all test cases does not exceed 2 cdot 10^5 . Print q numbers. The i -th number is the answer to the i -th question asked by Giorno. In the first test case, a = [2,1,3,3, ldots] . "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
212504148 jrsy F July 7, 2023, 5:03 a.m. OK GNU C++14 TESTS 98 639 73420800
212448773 zhangmingza F July 6, 2023, 4:49 p.m. OK GNU C++14 TESTS 97 1060 114073600
212499374 CLOCKS_PER_SEC F July 7, 2023, 3:56 a.m. OK GNU C++14 TESTS 98 1060 418406400
212499243 CLOCKS_PER_SEC F July 7, 2023, 3:54 a.m. OK GNU C++14 TESTS 98 1060 418406400
212498878 CLOCKS_PER_SEC F July 7, 2023, 3:50 a.m. OK GNU C++14 TESTS 98 1060 418406400
212498314 CLOCKS_PER_SEC F July 7, 2023, 3:43 a.m. OK GNU C++14 TESTS 98 1060 418406400
212485661 cyh_toby F July 7, 2023, 12:47 a.m. OK GNU C++14 TESTS 98 1170 232448000
212457202 bary F July 6, 2023, 6:16 p.m. OK GNU C++14 TESTS 97 1216 203673600
212485544 cyh_toby F July 7, 2023, 12:44 a.m. OK GNU C++14 TESTS 98 1231 226406400
212466433 sakurasonic F July 6, 2023, 7:26 p.m. OK GNU C++14 TESTS 97 1247 203366400
212457069 xioxio F July 6, 2023, 6:15 p.m. OK GNU C++17 TESTS 97 451 139878400
212504008 _suyue F July 7, 2023, 5 a.m. OK GNU C++17 TESTS 98 608 73420800
212442560 seecret F July 6, 2023, 4:33 p.m. OK GNU C++17 TESTS 97 717 55603200
212495047 Shayan.P F July 7, 2023, 3:04 a.m. OK GNU C++17 TESTS 98 951 7577600
212453852 SGColin F July 6, 2023, 5:56 p.m. OK GNU C++17 TESTS 97 1169 38707200
212452593 Gaoyx F July 6, 2023, 5:51 p.m. OK GNU C++17 TESTS 97 1169 38707200
212483378 mutharib F July 6, 2023, 11:57 p.m. OK GNU C++17 TESTS 98 1356 62156800
212481319 Mtaylor F July 6, 2023, 11:11 p.m. OK GNU C++17 TESTS 98 1388 73318400
212446866 3417 F July 6, 2023, 4:45 p.m. OK GNU C++17 TESTS 97 1435 206028800
212456456 paula F July 6, 2023, 6:11 p.m. OK GNU C++17 TESTS 97 1528 405094400
212457094 vaporization F July 6, 2023, 6:15 p.m. OK GNU C++17 (64) TESTS 97 701 30208000
212485885 LXH-cat F July 7, 2023, 12:51 a.m. OK GNU C++17 (64) TESTS 98 920 311808000
212484067 LXH-cat F July 7, 2023, 12:11 a.m. OK GNU C++17 (64) TESTS 98 998 311808000
212457212 trainwithoutpain F July 6, 2023, 6:16 p.m. OK GNU C++17 (64) TESTS 97 1013 204390400
212484100 dognotlike F July 7, 2023, 12:12 a.m. OK GNU C++17 (64) TESTS 98 1029 152268800
212457158 I_HATE_GEOMETRY F July 6, 2023, 6:16 p.m. OK GNU C++17 (64) TESTS 97 1029 206028800
212446351 Star-Plunker F July 6, 2023, 4:43 p.m. OK GNU C++17 (64) TESTS 97 1045 274124800
212480165 enslaved F July 6, 2023, 10:47 p.m. OK GNU C++17 (64) TESTS 98 1091 111513600
212447414 zzpcd F July 6, 2023, 4:46 p.m. OK GNU C++17 (64) TESTS 97 1107 206028800
212498478 yangjl F July 7, 2023, 3:45 a.m. OK GNU C++17 (64) TESTS 98 1200 274022400
212504379 parthtotalfun F July 7, 2023, 5:06 a.m. OK GNU C++20 (64) TESTS 98 187 11673600
212459084 Untitled_geek306 F July 6, 2023, 6:30 p.m. OK GNU C++20 (64) TESTS 97 374 210636800
212460990 quanmcvn F July 6, 2023, 6:47 p.m. OK GNU C++20 (64) TESTS 97 420 74240000
212459210 Misono_Mika F July 6, 2023, 6:31 p.m. OK GNU C++20 (64) TESTS 97 483 41881600
212481721 eggag32 F July 6, 2023, 11:20 p.m. OK GNU C++20 (64) TESTS 98 498 126259200
212470960 shiven F July 6, 2023, 8:18 p.m. OK GNU C++20 (64) TESTS 98 560 98611200
212469504 shiven F July 6, 2023, 8 p.m. OK GNU C++20 (64) TESTS 97 561 93081600
212469410 shiven F July 6, 2023, 7:59 p.m. OK GNU C++20 (64) TESTS 97 717 168652800
212480348 A_G F July 6, 2023, 10:51 p.m. OK GNU C++20 (64) TESTS 98 779 234291200
212507005 wakaka F July 7, 2023, 5:40 a.m. OK GNU C++20 (64) TESTS 98 873 203673600
212500346 cpchenpi F July 7, 2023, 4:09 a.m. OK Rust 2021 TESTS 98 607 206131200
212500055 cpchenpi F July 7, 2023, 4:05 a.m. OK Rust 2021 TESTS 98 639 206131200
212498781 cpchenpi F July 7, 2023, 3:48 a.m. OK Rust 2021 TESTS 98 686 206131200

remove filters

Back to search problems