Codeforces Round 408 (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
796 Codeforces Round 408 (Div. 2) FINISHED False 7200 284563523 April 10, 2017, 4:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 204 ) F Sequence Recovery PROGRAMMING bitmasks data structures greedy 2800

Zane once had a good sequence a consisting of n integers a 1 , a 2 , ..., a n — but he has lost it. A sequence is said to be good if and only if all of its integers are non-negative and do not exceed 10 9 in value. However, Zane remembers having played around with his sequence by applying m operations to it. There are two types of operations: 1. Find the maximum value of integers with indices i such that l ≤ i ≤ r , given l and r . 2. Assign d as the value of the integer with index k , given k and d . After he finished playing, he restored his sequence to the state it was before any operations were applied. That is, sequence a was no longer affected by the applied type 2 operations. Then, he lost his sequence at some time between now and then. Fortunately, Zane remembers all the operations and the order he applied them to his sequence, along with the distinct results of all type 1 operations. Moreover, among all good sequences that would produce the same results when the same operations are applied in the same order, he knows that his sequence a has the greatest cuteness . We define cuteness of a sequence as the bitwise OR result of all integers in such sequence. For example, the cuteness of Zane's sequence a is a 1 OR a 2 OR ... OR a n . Zane understands that it might not be possible to recover exactly the lost sequence given his information, so he would be happy to get any good sequence b consisting of n integers b 1 , b 2 , ..., b n that: 1. would give the same results when the same operations are applied in the same order, and 2. has the same cuteness as that of Zane's original sequence a . If there is such a sequence, find it. Otherwise, it means that Zane must have remembered something incorrectly, which is possible. The first line contains two integers n and m ( 1 ≤ n , m ≤ 3·10 5 ) — the number of integers in Zane's original sequence and the number of operations that have been applied to the sequence, respectively. The i -th of the following m line

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
26819497 xzyxzy F May 3, 2017, 1:21 p.m. OK GNU C++ TESTS 136 265 20480000 2800
27275658 AkaneSasu F May 22, 2017, 1:54 a.m. OK GNU C++ TESTS 136 280 24064000 2800
40981786 ReaLNero1 F July 30, 2018, 6:08 p.m. OK GNU C++ TESTS 136 295 24064000 2800
40981228 ReaLNero1 F July 30, 2018, 5:53 p.m. OK GNU C++ TESTS 136 296 18329600 2800
26319482 zhan8855 F April 12, 2017, 2:16 p.m. OK GNU C++ TESTS 136 421 37990400 2800
26329439 Ajatar F April 13, 2017, 12:53 a.m. OK GNU C++ TESTS 136 468 27340800 2800
26378502 iamz F April 15, 2017, 11:53 a.m. OK GNU C++ TESTS 136 483 28569600 2800
27089001 guoyu1098 F May 13, 2017, 12:37 p.m. OK GNU C++ TESTS 136 592 31641600 2800
26456894 unicornt F April 17, 2017, 2:07 p.m. OK GNU C++ TESTS 136 873 47001600 2800
26784601 zandrad11 F May 1, 2017, 11:37 a.m. OK GNU C++ TESTS 136 1231 32768000 2800
26329560 lzr_010506 F April 13, 2017, 1:15 a.m. OK GNU C++11 TESTS 136 311 27443200 2800
54986479 KMAASZRAA F June 2, 2019, 3:59 p.m. OK GNU C++11 TESTS 136 327 16076800 2800
48057330 skywalkert F Jan. 7, 2019, 1:04 p.m. OK GNU C++11 TESTS 136 421 9625600 2800
26466068 Cherries F April 18, 2017, 12:29 a.m. OK GNU C++11 TESTS 136 421 27340800 2800
26308990 shdut F April 11, 2017, 11:59 p.m. OK GNU C++11 TESTS 136 560 25190400 2800
54566900 vjudge1 F May 24, 2019, 4:59 p.m. OK GNU C++11 TESTS 136 561 73420800 2800
45152573 bendazsaropaeen F Oct. 31, 2018, 9:08 p.m. OK GNU C++11 TESTS 136 577 26521600 2800
26341679 oakszyjrnrdy F April 13, 2017, 2:29 p.m. OK GNU C++11 TESTS 136 592 29798400 2800
26380869 danya090699 F April 15, 2017, 1:54 p.m. OK GNU C++11 TESTS 136 608 30105600 2800
26293388 amsen F April 11, 2017, 8:23 a.m. OK GNU C++11 TESTS 136 608 32563200 2800
27578479 Seawolf08 WaruidesuJimmy CHGeorgeV F June 5, 2017, 8:14 a.m. OK GNU C++14 TESTS 136 373 20684800 2800
26525681 WeiYong F April 20, 2017, 7:59 p.m. OK GNU C++14 TESTS 136 373 22528000 2800
28929952 WeiYong F July 27, 2017, 12:22 p.m. OK GNU C++14 TESTS 136 421 22835200 2800
41271752 aquablitz11 F Aug. 6, 2018, 10:47 a.m. OK GNU C++14 TESTS 136 421 31641600 2800
28931679 WeiYong F July 27, 2017, 1:46 p.m. OK GNU C++14 TESTS 136 436 22528000 2800
26332844 YakutovDmitriy F April 13, 2017, 7:50 a.m. OK GNU C++14 TESTS 136 436 24371200 2800
26836575 WeiYong F May 4, 2017, 2:21 p.m. OK GNU C++14 TESTS 136 451 20992000 2800
28932124 WeiYong F July 27, 2017, 2:11 p.m. OK GNU C++14 TESTS 136 451 22528000 2800
28932361 WeiYong F July 27, 2017, 2:25 p.m. OK GNU C++14 TESTS 136 451 22630400 2800
26526095 WeiYong F April 20, 2017, 8:29 p.m. OK GNU C++14 TESTS 136 451 22835200 2800
69502290 hjk1030 F Jan. 25, 2020, 7:04 a.m. OK GNU C++17 TESTS 136 483 18329600 2800
58542353 Medeowex F Aug. 10, 2019, 2:51 p.m. OK GNU C++17 TESTS 136 529 20992000 2800
52012480 alex_Harry F March 30, 2019, 9:11 a.m. OK GNU C++17 TESTS 136 904 18636800 2800
60464952 AliShahali1382 F Sept. 13, 2019, 12:22 a.m. OK GNU C++17 TESTS 136 904 43929600 2800
69255077 davooddkareshki F Jan. 21, 2020, 3:24 p.m. OK GNU C++17 TESTS 136 966 41369600 2800
26529907 donli F April 21, 2017, 3:37 a.m. OK Java 8 TESTS 136 1013 33689600 2800
26298296 uwi F April 11, 2017, 12:25 p.m. OK Java 8 TESTS 136 1747 60416000 2800
27952261 tri F June 21, 2017, 8:06 p.m. OK Java 8 TESTS 136 1980 74137600 2800

remove filters

Back to search problems