Codeforces Round 738 (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
1559 Codeforces Round 738 (Div. 2) FINISHED False 8100 108141863 Aug. 15, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 32930 ) A Mocha and Math PROGRAMMING bitmasks constructive algorithms math 900

B'Mocha is a young girl from high school. She has learned so much interesting knowledge from her teachers, especially her math teacher. Recently, Mocha is learning about binary system and very interested in bitwise operation. This day, Mocha got a sequence a of length n . In each operation, she can select an arbitrary interval [l, r] and for all values i ( 0 <= q i <= q r-l ), replace a_{l+i} with a_{l+i} , & , a_{r-i} at the same time, where & denotes the bitwise AND operation. This operation can be performed any number of times. For example, if n=5 , the array is [a_1,a_2,a_3,a_4,a_5] , and Mocha selects the interval [2,5] , then the new array is [a_1,a_2 , & , a_5, a_3 , & , a_4, a_4 , & , a_3, a_5 , & , a_2] . Now Mocha wants to minimize the maximum value in the sequence. As her best friend, can you help her to get the answer? Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. Each test case consists of two lines. The first line of each test case contains a single integer n ( 1 <= n <= 100 ) -- the length of the sequence. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 10^9 ). For each test case, print one integer -- the minimal value of the maximum value in the sequence. In the first test case, Mocha can choose the interval [1,2] , then the sequence becomes [ 0, 0] , where the first element is 1 , & ,2 , and the second element is 2 , & ,1 . In the second test case, Mocha can choose the interval [1,3] , then the sequence becomes [ 1,1,1] , where the first element is 1 , & ,3 , the second element is 1 , & ,1 , and the third element is 3 , & ,1 . '...

Tutorials

Tutorial (en)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
127008783 k4m1k4ze A Aug. 26, 2021, 1:40 a.m. OK GNU C11 TESTS 72 31 3686400 900
126963105 firestorm_1 A Aug. 25, 2021, 11:20 a.m. OK GNU C11 TESTS 72 31 3686400 900
126844473 Joker1010123 A Aug. 24, 2021, 1:57 p.m. OK GNU C11 TESTS 72 31 3686400 900
126770257 lmnopqrst A Aug. 23, 2021, 3:05 p.m. OK GNU C11 TESTS 72 31 3686400 900
126671124 h111801015 A Aug. 22, 2021, 7:10 a.m. OK GNU C11 TESTS 72 31 3686400 900
126670279 tomsay A Aug. 22, 2021, 6:55 a.m. OK GNU C11 TESTS 72 31 3686400 900
126658298 danielwijaya2004 A Aug. 22, 2021, 1:05 a.m. OK GNU C11 TESTS 72 31 3686400 900
126216198 BugLeave A Aug. 17, 2021, 10:48 p.m. OK GNU C11 TESTS 72 31 3686400 900
126250307 SoluckyBhavya9 A Aug. 18, 2021, 9:26 a.m. OK GNU C11 TESTS 72 31 3686400 900
126600467 H_a_c_kcode_gaurav A Aug. 21, 2021, 8:10 a.m. OK GNU C11 TESTS 72 31 3686400 900
126151409 SFD_Bri A Aug. 17, 2021, 7:15 a.m. OK GNU C++14 TESTS 72 30 3686400 900
126188800 Dipak_Sharma A Aug. 17, 2021, 2:37 p.m. OK GNU C++14 TESTS 72 30 3788800 900
126612007 nhphuongltv A Aug. 21, 2021, 10:29 a.m. OK GNU C++14 TESTS 72 30 3788800 900
126252552 schwi_riku A Aug. 18, 2021, 9:57 a.m. OK GNU C++14 TESTS 72 30 3891200 900
126388131 PartyJindal A Aug. 18, 2021, 9:36 p.m. OK GNU C++14 TESTS 72 30 3891200 900
126803885 harshitmakhija1204 A Aug. 24, 2021, 4:41 a.m. OK GNU C++14 TESTS 72 30 3891200 900
126695659 HomuraCN A Aug. 22, 2021, 2:27 p.m. OK GNU C++14 TESTS 72 31 3686400 900
126938551 Riyakumari13 A Aug. 25, 2021, 6:02 a.m. OK GNU C++14 TESTS 72 31 3686400 900
126811170 LJFan A Aug. 24, 2021, 6:34 a.m. OK GNU C++14 TESTS 72 31 3686400 900
126795206 cuixiao A Aug. 24, 2021, 12:03 a.m. OK GNU C++14 TESTS 72 31 3686400 900
126263227 viking09 A Aug. 18, 2021, 12:06 p.m. OK GNU C++17 TESTS 72 15 3788800 900
126188178 abdalkader-s A Aug. 17, 2021, 2:30 p.m. OK GNU C++17 TESTS 72 30 3788800 900
126213057 kejriwalawadh A Aug. 17, 2021, 9:01 p.m. OK GNU C++17 TESTS 72 30 3788800 900
126219490 vjudge3 A Aug. 18, 2021, 1:17 a.m. OK GNU C++17 TESTS 72 30 3788800 900
126461563 rt2700 A Aug. 19, 2021, 3:26 p.m. OK GNU C++17 TESTS 72 30 3788800 900
126504897 puppy A Aug. 20, 2021, 5:57 a.m. OK GNU C++17 TESTS 72 30 3788800 900
126906219 PhoenixSG A Aug. 24, 2021, 5:47 p.m. OK GNU C++17 TESTS 72 30 3788800 900
126693850 hackerito A Aug. 22, 2021, 1:59 p.m. OK GNU C++17 TESTS 72 30 3891200 900
126263912 akshat2808 A Aug. 18, 2021, 12:14 p.m. OK GNU C++17 TESTS 72 30 3891200 900
126827293 LooK1 A Aug. 24, 2021, 10:06 a.m. OK GNU C++17 TESTS 72 30 3891200 900
126575347 avicodes A Aug. 20, 2021, 10:33 p.m. OK GNU C++17 (64) TESTS 72 15 4300800 900
126389770 doughnutik A Aug. 18, 2021, 10:31 p.m. OK GNU C++17 (64) TESTS 72 30 4300800 900
126836262 devdatta2512 A Aug. 24, 2021, 12:09 p.m. OK GNU C++17 (64) TESTS 72 30 4300800 900
126755493 aman.34 A Aug. 23, 2021, 11:53 a.m. OK GNU C++17 (64) TESTS 72 30 4300800 900
126741788 Sanskar_1306 A Aug. 23, 2021, 8:25 a.m. OK GNU C++17 (64) TESTS 72 30 4300800 900
126598446 tantra11 A Aug. 21, 2021, 7:47 a.m. OK GNU C++17 (64) TESTS 72 30 4300800 900
126507398 SchukArk A Aug. 20, 2021, 6:32 a.m. OK GNU C++17 (64) TESTS 72 30 4300800 900
126440215 AyushShukla A Aug. 19, 2021, 11:53 a.m. OK GNU C++17 (64) TESTS 72 30 4300800 900
126172742 vjudge5 A Aug. 17, 2021, 11:38 a.m. OK GNU C++17 (64) TESTS 72 31 4198400 900
127000105 han123_ A Aug. 25, 2021, 7:54 p.m. OK GNU C++17 (64) TESTS 72 31 4300800 900
126770399 dagnaf A Aug. 23, 2021, 3:06 p.m. OK Go TESTS 72 31 10649600 900
126551778 Wolve_rine A Aug. 20, 2021, 3:34 p.m. OK Go TESTS 72 46 10649600 900
126939850 kiril.minkov A Aug. 25, 2021, 6:20 a.m. OK Go TESTS 72 61 11673600 900
126469631 Sanctum A Aug. 19, 2021, 4:50 p.m. OK Go TESTS 72 311 10649600 900
126523599 KarMa_ A Aug. 20, 2021, 9:50 a.m. OK Java 11 TESTS 72 186 23756800 900
126173818 harshitnsharma A Aug. 17, 2021, 11:50 a.m. OK Java 11 TESTS 72 186 23859200 900
126212773 adarsh_goku A Aug. 17, 2021, 8:53 p.m. OK Java 11 TESTS 72 186 23859200 900
126419793 sujaysaha2804 A Aug. 19, 2021, 8:03 a.m. OK Java 11 TESTS 72 187 23756800 900
126979102 debarpan_2019 A Aug. 25, 2021, 2:48 p.m. OK Java 11 TESTS 72 187 23756800 900
126745938 Witless_Deer A Aug. 23, 2021, 9:24 a.m. OK Java 11 TESTS 72 187 23756800 900
126643265 LNB A Aug. 21, 2021, 5:34 p.m. OK Java 11 TESTS 72 187 23756800 900
126626321 shirleynatania A Aug. 21, 2021, 1:45 p.m. OK Java 11 TESTS 72 187 23756800 900
126495755 mphillotry A Aug. 20, 2021, 2:53 a.m. OK Java 11 TESTS 72 187 23756800 900
126475680 ykv749 A Aug. 19, 2021, 6:04 p.m. OK Java 11 TESTS 72 187 23756800 900
126469980 tarun_sm A Aug. 19, 2021, 4:54 p.m. OK Java 8 TESTS 72 109 20172800 900
126253815 gautam.abhinav36 A Aug. 18, 2021, 10:15 a.m. OK Java 8 TESTS 72 109 20582400 900
126422974 Dewansh_25 A Aug. 19, 2021, 8:38 a.m. OK Java 8 TESTS 72 124 20275200 900
126478517 kelvinc1024 A Aug. 19, 2021, 6:45 p.m. OK Java 8 TESTS 72 124 20377600 900
126220590 thedesalizes A Aug. 18, 2021, 1:49 a.m. OK Java 8 TESTS 72 124 20377600 900
126211238 sourav2999 A Aug. 17, 2021, 8:05 p.m. OK Java 8 TESTS 72 124 20377600 900
126210499 O_E A Aug. 17, 2021, 7:48 p.m. OK Java 8 TESTS 72 124 20377600 900
126203580 Nakul_Thureja A Aug. 17, 2021, 5:50 p.m. OK Java 8 TESTS 72 124 20377600 900
127002520 bubnov A Aug. 25, 2021, 8:56 p.m. OK Java 8 TESTS 72 124 20377600 900
126842258 yernar_zh A Aug. 24, 2021, 1:27 p.m. OK Java 8 TESTS 72 124 20377600 900
126485611 arvindf232 A Aug. 19, 2021, 9:01 p.m. OK Kotlin TESTS 72 124 20787200 900
126457885 EgorShibaev A Aug. 19, 2021, 2:50 p.m. OK Kotlin TESTS 72 140 21708800 900
126518573 gigajet A Aug. 20, 2021, 8:48 a.m. OK Kotlin TESTS 72 155 21708800 900
126455643 catcatcute A Aug. 19, 2021, 2:30 p.m. OK Kotlin TESTS 72 155 21811200 900
126417399 Jamesbond_007 A Aug. 19, 2021, 7:37 a.m. OK Kotlin TESTS 72 171 21299200 900
126203446 wbars A Aug. 17, 2021, 5:48 p.m. OK Kotlin TESTS 72 187 21708800 900
126243403 Spheniscine A Aug. 18, 2021, 8:04 a.m. OK Kotlin TESTS 72 202 22835200 900
127005931 JJMV A Aug. 25, 2021, 11:25 p.m. OK MS C++ 2017 TESTS 72 31 3686400 900
126161055 vjudge3 A Aug. 17, 2021, 9:07 a.m. OK MS C++ 2017 TESTS 72 31 3686400 900
126657368 Ecilantro A Aug. 22, 2021, 12:17 a.m. OK MS C++ 2017 TESTS 72 31 3788800 900
126689909 venom48427 A Aug. 22, 2021, 12:50 p.m. OK MS C++ 2017 TESTS 72 31 3788800 900
126653409 TheRomulus A Aug. 21, 2021, 9:09 p.m. OK MS C++ 2017 TESTS 72 31 3788800 900
126602999 IAmTheNight2000 A Aug. 21, 2021, 8:42 a.m. OK MS C++ 2017 TESTS 72 31 3788800 900
126576811 plen A Aug. 20, 2021, 11:45 p.m. OK MS C++ 2017 TESTS 72 31 3788800 900
126545990 CtrlAlt A Aug. 20, 2021, 2:31 p.m. OK MS C++ 2017 TESTS 72 31 3788800 900
126534373 cfeitong A Aug. 20, 2021, 12:10 p.m. OK MS C++ 2017 TESTS 72 31 3788800 900
126487145 nik2005 A Aug. 19, 2021, 9:49 p.m. OK MS C++ 2017 TESTS 72 31 3788800 900
126228324 Dnk4315 A Aug. 18, 2021, 4:37 a.m. OK .NET Core C# TESTS 72 108 12288000 900
126826127 feeder A Aug. 24, 2021, 9:50 a.m. OK Node.js TESTS 72 108 13516800 900
126210843 Nika_Tamliani A Aug. 17, 2021, 7:56 p.m. OK Ocaml TESTS 72 31 3993600 900
126197547 newgate A Aug. 17, 2021, 4:25 p.m. OK PyPy 3 TESTS 72 109 20787200 900
126543152 hsh8086 A Aug. 20, 2021, 1:59 p.m. OK PyPy 3 TESTS 72 109 21708800 900
126178187 vaibhavtiwari.nituk A Aug. 17, 2021, 12:41 p.m. OK PyPy 3 TESTS 72 109 21708800 900
126185283 rukon A Aug. 17, 2021, 1:59 p.m. OK PyPy 3 TESTS 72 109 22118400 900
126268117 YMSeah A Aug. 18, 2021, 1:01 p.m. OK PyPy 3 TESTS 72 124 21606400 900
126548284 hsh8086 A Aug. 20, 2021, 2:57 p.m. OK PyPy 3 TESTS 72 124 21708800 900
126207106 hxu10 A Aug. 17, 2021, 6:44 p.m. OK PyPy 3 TESTS 72 124 21708800 900
126806821 taiga0629 A Aug. 24, 2021, 5:32 a.m. OK PyPy 3 TESTS 72 124 22016000 900
126968211 VN.Kiet A Aug. 25, 2021, 12:29 p.m. OK PyPy 3 TESTS 72 124 22118400 900
126816849 _ilahi A Aug. 24, 2021, 7:43 a.m. OK PyPy 3 TESTS 72 124 22118400 900
126778290 tanyaelenik1 A Aug. 23, 2021, 4:47 p.m. OK Python 3 TESTS 72 62 6963200 900
126391676 Kant94 A Aug. 18, 2021, 11:37 p.m. OK Python 3 TESTS 72 62 6963200 900
126823569 alpha__18 A Aug. 24, 2021, 9:13 a.m. OK Python 3 TESTS 72 62 7065600 900
126163569 sart-king A Aug. 17, 2021, 9:41 a.m. OK Python 3 TESTS 72 62 7065600 900
126939992 AdvithDesu A Aug. 25, 2021, 6:22 a.m. OK Python 3 TESTS 72 77 6758400 900
126933944 coder3433 A Aug. 25, 2021, 4:57 a.m. OK Python 3 TESTS 72 77 6758400 900
126613364 sermir2003 A Aug. 21, 2021, 10:46 a.m. OK Python 3 TESTS 72 77 6758400 900
126539836 anjumarnab A Aug. 20, 2021, 1:20 p.m. OK Python 3 TESTS 72 77 6758400 900
126230490 nitish712 A Aug. 18, 2021, 5:14 a.m. OK Python 3 TESTS 72 77 6758400 900
126220319 zhanghengrui A Aug. 18, 2021, 1:42 a.m. OK Python 3 TESTS 72 77 6758400 900
126157680 LukaTchumburidze A Aug. 17, 2021, 8:25 a.m. OK Rust TESTS 72 31 3891200 900
126694873 avoid A Aug. 22, 2021, 2:16 p.m. OK Rust TESTS 72 31 3891200 900
126275297 ivan0sokin A Aug. 18, 2021, 2:23 p.m. OK Rust TESTS 72 31 3891200 900
126190786 sasha.kudasov04 A Aug. 17, 2021, 3 p.m. OK Rust TESTS 72 31 3891200 900
126602070 Spheniscine A Aug. 21, 2021, 8:30 a.m. OK Rust TESTS 72 46 3993600 900

remove filters

Back to search problems