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 |
---|---|---|---|---|---|---|
1554 | Codeforces Round 735 (Div. 2) | FINISHED | False | 7200 | 109610663 | July 29, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 12974 ) | B | Cobb | PROGRAMMING | bitmasks brute force greedy math | 1700 |
B"You are given n integers a_1, a_2, ldots, a_n and an integer k . Find the maximum value of i cdot j - k cdot (a_i | a_j) over all pairs (i, j) of integers with 1 <= i < j <= n . Here, | is the bitwise OR operator. The first line contains a single integer t ( 1 <= t <= 10 ,000 ) -- the number of test cases. The first line of each test case contains two integers n ( 2 <= n <= 10^5 ) and k ( 1 <= k <= min(n, 100) ). The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= n ). It is guaranteed that the sum of n over all test cases doesn't exceed 3 cdot 10^5 . For each test case, print a single integer -- the maximum possible value of i cdot j - k cdot (a_i | a_j) . Let f(i, j) = i cdot j - k cdot (a_i | a_j) . In the first test case, So the maximum is f(1, 2) = -1 . In the fourth test case, the maximum is f(3, 4) = 12 . "... |
Editorial of Codeforces Round #735 (Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
124205304 | gxlois | B | July 29, 2021, 9:25 p.m. | OK | D | TESTS | 95 | 249 | 10854400 | 1700 | |
124214798 | sdutxy | B | July 30, 2021, 1:43 a.m. | OK | GNU C11 | TESTS | 95 | 218 | 4505600 | 1700 | |
124203182 | Joker1010123 | B | July 29, 2021, 8:42 p.m. | OK | GNU C11 | TESTS | 89 | 218 | 4505600 | 1700 | |
124210788 | 1435730 | B | July 30, 2021, 12:16 a.m. | OK | GNU C11 | TESTS | 95 | 483 | 4096000 | 1700 | |
124212503 | OldTomatofun | B | July 30, 2021, 12:57 a.m. | OK | GNU C++11 | TESTS | 95 | 46 | 5529600 | 1700 | |
124212525 | fangzhijian2020 | B | July 30, 2021, 12:58 a.m. | OK | GNU C++11 | TESTS | 95 | 46 | 5529600 | 1700 | |
124211739 | Tidiane | B | July 30, 2021, 12:40 a.m. | OK | GNU C++11 | TESTS | 95 | 46 | 6348800 | 1700 | |
124225174 | SixFeetUnder | B | July 30, 2021, 4:33 a.m. | OK | GNU C++11 | TESTS | 96 | 46 | 45465600 | 1700 | |
124188668 | LYYY | B | July 29, 2021, 5:41 p.m. | OK | GNU C++11 | TESTS | 89 | 61 | 4403200 | 1700 | |
124227340 | shennnn | B | July 30, 2021, 5:04 a.m. | OK | GNU C++11 | TESTS | 96 | 61 | 4710400 | 1700 | |
124212241 | No-Rain | B | July 30, 2021, 12:52 a.m. | OK | GNU C++11 | TESTS | 95 | 61 | 11878400 | 1700 | |
124189632 | hangzai | B | July 29, 2021, 5:48 p.m. | OK | GNU C++11 | TESTS | 89 | 62 | 4300800 | 1700 | |
124189093 | hangzai | B | July 29, 2021, 5:44 p.m. | OK | GNU C++11 | TESTS | 89 | 62 | 4300800 | 1700 | |
124191838 | ocyy | B | July 29, 2021, 6:09 p.m. | OK | GNU C++11 | TESTS | 89 | 62 | 4300800 | 1700 | |
124222157 | tokitsukaze | B | July 30, 2021, 3:46 a.m. | OK | GNU C++14 | TESTS | 96 | 62 | 4710400 | 1700 | |
124213505 | SurajitPore | B | July 30, 2021, 1:18 a.m. | OK | GNU C++14 | TESTS | 95 | 93 | 4096000 | 1700 | |
124194804 | gandhiji21 | B | July 29, 2021, 6:40 p.m. | OK | GNU C++14 | TESTS | 89 | 93 | 4505600 | 1700 | |
124183102 | mathking1021 | B | July 29, 2021, 4:31 p.m. | OK | GNU C++14 | TESTS | 89 | 93 | 4505600 | 1700 | |
124187394 | stefdasca | B | July 29, 2021, 5:35 p.m. | OK | GNU C++14 | TESTS | 89 | 93 | 5222400 | 1700 | |
124192601 | manvi2912 | B | July 29, 2021, 6:18 p.m. | OK | GNU C++14 | TESTS | 89 | 108 | 4096000 | 1700 | |
124227418 | rickwang | B | July 30, 2021, 5:05 a.m. | OK | GNU C++14 | TESTS | 96 | 108 | 4505600 | 1700 | |
124210549 | AkaiLemon | B | July 30, 2021, 12:07 a.m. | OK | GNU C++14 | TESTS | 95 | 108 | 4505600 | 1700 | |
124190120 | shubh_doshi | B | July 29, 2021, 5:52 p.m. | OK | GNU C++14 | TESTS | 89 | 108 | 4812800 | 1700 | |
124189504 | aman_999 | B | July 29, 2021, 5:46 p.m. | OK | GNU C++14 | TESTS | 89 | 109 | 4096000 | 1700 | |
124183790 | lt123456 | B | July 29, 2021, 4:33 p.m. | OK | GNU C++17 | TESTS | 89 | 31 | 6144000 | 1700 | |
124183831 | kunalverma19 | B | July 29, 2021, 4:33 p.m. | OK | GNU C++17 | TESTS | 89 | 93 | 4096000 | 1700 | |
124220863 | JackPrice | B | July 30, 2021, 3:25 a.m. | OK | GNU C++17 | TESTS | 96 | 93 | 4096000 | 1700 | |
124220513 | kunalverma19 | B | July 30, 2021, 3:20 a.m. | OK | GNU C++17 | TESTS | 96 | 93 | 4403200 | 1700 | |
124195264 | mythlee | B | July 29, 2021, 6:46 p.m. | OK | GNU C++17 | TESTS | 89 | 93 | 4403200 | 1700 | |
124188448 | mubin_akib | B | July 29, 2021, 5:39 p.m. | OK | GNU C++17 | TESTS | 89 | 93 | 4403200 | 1700 | |
124225147 | XDEv11 | B | July 30, 2021, 4:33 a.m. | OK | GNU C++17 | TESTS | 96 | 93 | 4403200 | 1700 | |
124199656 | Pa_sha | B | July 29, 2021, 7:41 p.m. | OK | GNU C++17 | TESTS | 89 | 93 | 4505600 | 1700 | |
124188351 | FairoozR | B | July 29, 2021, 5:39 p.m. | OK | GNU C++17 | TESTS | 89 | 93 | 4505600 | 1700 | |
124221548 | sharad4730 | B | July 30, 2021, 3:36 a.m. | OK | GNU C++17 | TESTS | 96 | 93 | 4505600 | 1700 | |
124213129 | KirbyOvO | B | July 30, 2021, 1:10 a.m. | OK | GNU C++17 (64) | TESTS | 95 | 31 | 9318400 | 1700 | |
124201567 | Punisher_at_work | B | July 29, 2021, 8:12 p.m. | OK | GNU C++17 (64) | TESTS | 89 | 62 | 4710400 | 1700 | |
124191785 | Geothermal | B | July 29, 2021, 6:09 p.m. | OK | GNU C++17 (64) | TESTS | 89 | 62 | 4710400 | 1700 | |
124219195 | zhayu202010516 | B | July 30, 2021, 2:59 a.m. | OK | GNU C++17 (64) | TESTS | 96 | 62 | 4710400 | 1700 | |
124225852 | Samia2001 | B | July 30, 2021, 4:43 a.m. | OK | GNU C++17 (64) | TESTS | 96 | 62 | 5120000 | 1700 | |
124200674 | Prakhar6969 | B | July 29, 2021, 7:57 p.m. | OK | GNU C++17 (64) | TESTS | 89 | 62 | 5120000 | 1700 | |
124199227 | mystic_ankush | B | July 29, 2021, 7:36 p.m. | OK | GNU C++17 (64) | TESTS | 89 | 62 | 5120000 | 1700 | |
124198706 | sxseven | B | July 29, 2021, 7:29 p.m. | OK | GNU C++17 (64) | TESTS | 89 | 62 | 5120000 | 1700 | |
124197786 | googlepixel4a | B | July 29, 2021, 7:17 p.m. | OK | GNU C++17 (64) | TESTS | 89 | 62 | 5120000 | 1700 | |
124231292 | piddddgy | B | July 30, 2021, 6 a.m. | OK | GNU C++17 (64) | TESTS | 96 | 62 | 5120000 | 1700 | |
124216760 | 0x3F | B | July 30, 2021, 2:20 a.m. | OK | Go | TESTS | 96 | 202 | 16179200 | 1700 | |
124191433 | ayush__1411 | B | July 29, 2021, 6:05 p.m. | OK | Java 11 | TESTS | 89 | 265 | 24576000 | 1700 | |
124205056 | qwerty12345qwerty | B | July 29, 2021, 9:19 p.m. | OK | Java 11 | TESTS | 95 | 280 | 23859200 | 1700 | |
124201464 | Vikas_Ahlawat | B | July 29, 2021, 8:11 p.m. | OK | Java 11 | TESTS | 89 | 280 | 23961600 | 1700 | |
124191559 | ayush__1411 | B | July 29, 2021, 6:06 p.m. | OK | Java 11 | TESTS | 89 | 280 | 24473600 | 1700 | |
124190419 | MubtasimShahriar | B | July 29, 2021, 5:54 p.m. | OK | Java 11 | TESTS | 89 | 296 | 23859200 | 1700 | |
124191299 | ayush__1411 | B | July 29, 2021, 6:03 p.m. | OK | Java 11 | TESTS | 89 | 296 | 24473600 | 1700 | |
124190279 | pravin_as | B | July 29, 2021, 5:53 p.m. | OK | Java 11 | TESTS | 89 | 296 | 24678400 | 1700 | |
124212023 | SadFriedRice | B | July 30, 2021, 12:47 a.m. | OK | Java 11 | TESTS | 95 | 311 | 24473600 | 1700 | |
124201338 | siva03 | B | July 29, 2021, 8:09 p.m. | OK | Java 11 | TESTS | 89 | 311 | 28979200 | 1700 | |
124198872 | wphsucf | B | July 29, 2021, 7:31 p.m. | OK | Java 11 | TESTS | 89 | 312 | 24678400 | 1700 | |
124202825 | TriumphantEggplant | B | July 29, 2021, 8:35 p.m. | OK | Java 8 | TESTS | 89 | 171 | 20480000 | 1700 | |
124187995 | themadknight45 | B | July 29, 2021, 5:37 p.m. | OK | Java 8 | TESTS | 89 | 187 | 21504000 | 1700 | |
124209063 | ChiMasterBing | B | July 29, 2021, 11:10 p.m. | OK | Java 8 | TESTS | 95 | 187 | 21606400 | 1700 | |
124200450 | themadknight45 | B | July 29, 2021, 7:54 p.m. | OK | Java 8 | TESTS | 89 | 202 | 21504000 | 1700 | |
124209031 | ChiMasterBing | B | July 29, 2021, 11:09 p.m. | OK | Java 8 | TESTS | 95 | 202 | 21606400 | 1700 | |
124191441 | BruteForcee | B | July 29, 2021, 6:05 p.m. | OK | Java 8 | TESTS | 89 | 202 | 21708800 | 1700 | |
124230506 | harsh_03_m | B | July 30, 2021, 5:50 a.m. | OK | Java 8 | TESTS | 96 | 233 | 21606400 | 1700 | |
124217086 | soato1405 | B | July 30, 2021, 2:26 a.m. | OK | Java 8 | TESTS | 96 | 234 | 21606400 | 1700 | |
124187679 | Lior | B | July 29, 2021, 5:36 p.m. | OK | Java 8 | TESTS | 89 | 249 | 20684800 | 1700 | |
124227392 | priyam_anand | B | July 30, 2021, 5:05 a.m. | OK | Java 8 | TESTS | 96 | 249 | 21606400 | 1700 | |
124202640 | amanpatel23 | B | July 29, 2021, 8:32 p.m. | OK | Kotlin | TESTS | 89 | 374 | 23756800 | 1700 | |
124219240 | 18813155923 | B | July 30, 2021, 3 a.m. | OK | MS C++ | TESTS | 96 | 187 | 4710400 | 1700 | |
124220666 | ZKZ_123 | B | July 30, 2021, 3:22 a.m. | OK | MS C++ | TESTS | 96 | 514 | 4710400 | 1700 | |
124218463 | 18813155923 | B | July 30, 2021, 2:48 a.m. | OK | MS C++ | TESTS | 96 | 935 | 4710400 | 1700 | |
124213850 | sgly33 | B | July 30, 2021, 1:25 a.m. | OK | MS C++ 2017 | TESTS | 95 | 124 | 4505600 | 1700 | |
124213696 | sgly33 | B | July 30, 2021, 1:22 a.m. | OK | MS C++ 2017 | TESTS | 95 | 140 | 4505600 | 1700 | |
124213646 | sgly33 | B | July 30, 2021, 1:21 a.m. | OK | MS C++ 2017 | TESTS | 95 | 140 | 4505600 | 1700 | |
124180605 | Score12122 | B | July 29, 2021, 4:25 p.m. | OK | MS C++ 2017 | TESTS | 89 | 156 | 4505600 | 1700 | |
124213784 | sgly33 | B | July 30, 2021, 1:23 a.m. | OK | MS C++ 2017 | TESTS | 95 | 156 | 4505600 | 1700 | |
124230236 | seuangelfish | B | July 30, 2021, 5:47 a.m. | OK | MS C++ 2017 | TESTS | 96 | 202 | 4505600 | 1700 | |
124225290 | tzh123 | B | July 30, 2021, 4:35 a.m. | OK | MS C++ 2017 | TESTS | 96 | 233 | 4096000 | 1700 | |
124188944 | Vitazzz | B | July 29, 2021, 5:42 p.m. | OK | MS C++ 2017 | TESTS | 89 | 233 | 4915200 | 1700 | |
124202800 | Sherif_Sakran | B | July 29, 2021, 8:35 p.m. | OK | MS C++ 2017 | TESTS | 89 | 264 | 4710400 | 1700 | |
124223462 | rjrstuewfyg | B | July 30, 2021, 4:07 a.m. | OK | MS C++ 2017 | TESTS | 96 | 265 | 4608000 | 1700 | |
124203520 | ilter | B | July 29, 2021, 8:49 p.m. | OK | .NET Core C# | TESTS | 95 | 139 | 31641600 | 1700 | |
124214060 | LeThuHuyen | B | July 30, 2021, 1:29 a.m. | OK | .NET Core C# | TESTS | 95 | 171 | 35123200 | 1700 | |
124195211 | jainmilind | B | July 29, 2021, 6:45 p.m. | OK | PyPy 2 | TESTS | 89 | 233 | 35532800 | 1700 | |
124183164 | kagu | B | July 29, 2021, 4:31 p.m. | OK | PyPy 2 | TESTS | 89 | 717 | 37990400 | 1700 | |
124189131 | nogirosta | B | July 29, 2021, 5:44 p.m. | OK | PyPy 3 | TESTS | 89 | 187 | 33689600 | 1700 | |
124189425 | manish.17 | B | July 29, 2021, 5:46 p.m. | OK | PyPy 3 | TESTS | 89 | 218 | 35942400 | 1700 | |
124216254 | albertino1903 | B | July 30, 2021, 2:11 a.m. | OK | PyPy 3 | TESTS | 96 | 233 | 33792000 | 1700 | |
124195837 | FrozenKandy | B | July 29, 2021, 6:52 p.m. | OK | PyPy 3 | TESTS | 89 | 233 | 34304000 | 1700 | |
124228162 | Chef_17 | B | July 30, 2021, 5:17 a.m. | OK | PyPy 3 | TESTS | 96 | 234 | 35840000 | 1700 | |
124205450 | hxu10 | B | July 29, 2021, 9:28 p.m. | OK | PyPy 3 | TESTS | 95 | 234 | 36147200 | 1700 | |
124193572 | KeiTsukishima | B | July 29, 2021, 6:28 p.m. | OK | PyPy 3 | TESTS | 89 | 234 | 36147200 | 1700 | |
124195992 | piSquared | B | July 29, 2021, 6:54 p.m. | OK | PyPy 3 | TESTS | 89 | 248 | 33587200 | 1700 | |
124226759 | Keshav_Garg | B | July 30, 2021, 4:56 a.m. | OK | PyPy 3 | TESTS | 96 | 249 | 36659200 | 1700 | |
124209442 | armsusman | B | July 29, 2021, 11:22 p.m. | OK | PyPy 3 | TESTS | 95 | 249 | 37068800 | 1700 |
Back to search problems