Codeforces Round 890 (Div. 2) supported by Constructor Institute

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
1856 Codeforces Round 890 (Div. 2) supported by Constructor Institute FINISHED False 7200 45933863 Aug. 5, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3348 ) D More Wrong PROGRAMMING divide and conquer interactive

B'This is an interactive problem. The jury has hidden a permutation ^ dagger p of length n . In one query, you can pick two integers l and r ( 1 <= l < r <= n ) by paying (r - l)^2 coins. In return, you will be given the number of inversions ^ ddagger in the subarray [p_l, p_{l + 1}, ldots p_r] . Find the index of the maximum element in p by spending at most 5 cdot n^2 coins. Note: the grader is not adaptive: the permutation is fixed before any queries are made. ^ dagger A permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation ( 2 appears twice in the array), and [1,3,4] is also not a permutation ( n=3 but there is 4 in the array). ^ ddagger The number of inversions in an array is the number of pairs of indices (i,j) such that i < j and a_i > a_j . For example, the array [10,2,6,3] contains 4 inversions. The inversions are (1,2),(1,3),(1,4) , and (3,4) . Each test contains multiple test cases. The first line of input contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The only line of each test case contains a single integer n ( 2 <= n <= 2000 ) -- the length of the hidden permutation p . It is guaranteed that the sum of n over all test cases does not exceed 2000 . The interaction for each test case begins by reading the integer n . To make a query, output "? l r" ( 1 <= l < r <= n ) without quotes. Afterwards, you should read one single integer -- the answer for your query. If you receive the integer -1 instead of an answer or a valid value of n , it means your program has made an invalid query, has exceed the limit of queries, or has given an incorrect answer on the previous te'...

Tutorials

Codeforces Round #890 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
217376304 Tdyx D Aug. 5, 2023, 8:02 p.m. OK C# 10 TESTS 86 93 409600
217366501 Tdyx D Aug. 5, 2023, 6:31 p.m. OK C# 10 TESTS 86 124 409600
217403061 xxxxxxxb D Aug. 6, 2023, 4:24 a.m. OK Clang++20 Diagnostics TESTS 86 155 0
217367276 Gassa D Aug. 5, 2023, 6:38 p.m. OK D TESTS 86 93 204800
217366594 Gassa D Aug. 5, 2023, 6:32 p.m. OK D TESTS 86 93 204800
217365907 Gassa D Aug. 5, 2023, 6:26 p.m. OK D TESTS 86 109 204800
217403357 pengyantong D Aug. 6, 2023, 4:29 a.m. OK GNU C++14 TESTS 86 46 0
217400515 vjudge1 D Aug. 6, 2023, 3:42 a.m. OK GNU C++14 TESTS 86 46 0
217396235 shipeiqian D Aug. 6, 2023, 2:29 a.m. OK GNU C++14 TESTS 86 46 0
217396220 bkifhr10 D Aug. 6, 2023, 2:28 a.m. OK GNU C++14 TESTS 86 46 0
217396182 wxt1221 D Aug. 6, 2023, 2:28 a.m. OK GNU C++14 TESTS 86 46 0
217393907 Syara__ D Aug. 6, 2023, 1:45 a.m. OK GNU C++14 TESTS 86 46 0
217393151 Leo_W D Aug. 6, 2023, 1:30 a.m. OK GNU C++14 TESTS 86 46 0
217357166 Jeslan D Aug. 5, 2023, 5:28 p.m. OK GNU C++14 TESTS 86 46 0
217408300 _YXJS_ D Aug. 6, 2023, 5:39 a.m. OK GNU C++14 TESTS 86 61 0
217400272 Che_001 D Aug. 6, 2023, 3:38 a.m. OK GNU C++14 TESTS 86 61 0
217350305 Charming D Aug. 5, 2023, 4:32 p.m. OK GNU C++17 TESTS 86 30 102400
217403543 Red_rainOwO D Aug. 6, 2023, 4:32 a.m. OK GNU C++17 TESTS 86 31 0
217368430 I_Will_Marry_Ngoc D Aug. 5, 2023, 6:48 p.m. OK GNU C++17 TESTS 86 31 0
217356054 FzArK D Aug. 5, 2023, 5:24 p.m. OK GNU C++17 TESTS 86 31 307200
217410153 hsiu_yeeeee D Aug. 6, 2023, 6 a.m. OK GNU C++17 TESTS 86 46 0
217408162 dtta D Aug. 6, 2023, 5:37 a.m. OK GNU C++17 TESTS 86 46 0
217399565 keyHacker D Aug. 6, 2023, 3:27 a.m. OK GNU C++17 TESTS 86 46 0
217369063 Yzm007 D Aug. 5, 2023, 6:54 p.m. OK GNU C++17 TESTS 86 46 0
217362365 otoshigo D Aug. 5, 2023, 5:59 p.m. OK GNU C++17 TESTS 86 46 0
217382784 AlexanderL D Aug. 5, 2023, 9:33 p.m. OK GNU C++17 TESTS 86 46 204800
217405508 yingziYe D Aug. 6, 2023, 5:01 a.m. OK GNU C++17 (64) TESTS 86 46 0
217402506 Superposition D Aug. 6, 2023, 4:14 a.m. OK GNU C++17 (64) TESTS 86 46 102400
217402480 Superposition D Aug. 6, 2023, 4:14 a.m. OK GNU C++17 (64) TESTS 86 46 204800
217402230 Superposition D Aug. 6, 2023, 4:10 a.m. OK GNU C++17 (64) TESTS 86 46 204800
217390575 little_tomato D Aug. 6, 2023, 12:29 a.m. OK GNU C++17 (64) TESTS 86 46 307200
217387797 ccds D Aug. 5, 2023, 11:15 p.m. OK GNU C++17 (64) TESTS 86 61 0
217379859 Edu175 D Aug. 5, 2023, 8:46 p.m. OK GNU C++17 (64) TESTS 86 61 0
217373056 monkey8 D Aug. 5, 2023, 7:30 p.m. OK GNU C++17 (64) TESTS 86 61 0
217391351 _chroneZ D Aug. 6, 2023, 12:52 a.m. OK GNU C++17 (64) TESTS 86 61 204800
217382096 EduardoBrito D Aug. 5, 2023, 9:21 p.m. OK GNU C++17 (64) TESTS 86 61 307200
217397317 vjudge1 D Aug. 6, 2023, 2:48 a.m. OK GNU C++20 (64) TESTS 86 31 0
217382841 xweinp D Aug. 5, 2023, 9:33 p.m. OK GNU C++20 (64) TESTS 86 31 0
217381939 ChinatsuKano D Aug. 5, 2023, 9:19 p.m. OK GNU C++20 (64) TESTS 86 31 0
217359601 fanwen D Aug. 5, 2023, 5:41 p.m. OK GNU C++20 (64) TESTS 86 31 0
217379225 kozyulka D Aug. 5, 2023, 8:37 p.m. OK GNU C++20 (64) TESTS 86 31 204800
217407476 nh_nayeem D Aug. 6, 2023, 5:29 a.m. OK GNU C++20 (64) TESTS 86 46 0
217406379 rc_leon D Aug. 6, 2023, 5:14 a.m. OK GNU C++20 (64) TESTS 86 46 0
217403898 codingMIKU D Aug. 6, 2023, 4:37 a.m. OK GNU C++20 (64) TESTS 86 46 0
217402683 Susie.Rain D Aug. 6, 2023, 4:18 a.m. OK GNU C++20 (64) TESTS 86 46 0
217402561 Ivan_len D Aug. 6, 2023, 4:16 a.m. OK GNU C++20 (64) TESTS 86 46 0
217365306 IceWolf898 D Aug. 5, 2023, 6:22 p.m. OK Java 11 TESTS 86 389 0
217361573 ashanksingh1997 D Aug. 5, 2023, 5:54 p.m. OK Java 11 TESTS 86 467 204800
217357861 jack.t.y.wu D Aug. 5, 2023, 5:31 p.m. OK Java 17 TESTS 86 421 819200
217376736 hiromi_ayase D Aug. 5, 2023, 8:07 p.m. OK Java 17 TESTS 86 436 1228800
217403288 wizardleen D Aug. 6, 2023, 4:28 a.m. OK Java 17 TESTS 86 514 9830400
217391960 Ahmad_Hoseiny D Aug. 6, 2023, 1:06 a.m. OK Java 8 TESTS 86 312 17203200
217356783 jvmusin D Aug. 5, 2023, 5:26 p.m. OK Kotlin 1.7 TESTS 86 842 25600000
217389530 maxK99 D Aug. 6, 2023, midnight OK MS C++ 2017 TESTS 86 77 204800
217358463 mymelochan D Aug. 5, 2023, 5:35 p.m. OK PyPy 3 TESTS 86 280 5017600
217386507 conqueror_of_womais D Aug. 5, 2023, 10:45 p.m. OK PyPy 3 TESTS 86 295 5324800
217402937 jayasree_456 D Aug. 6, 2023, 4:21 a.m. OK PyPy 3-64 TESTS 86 249 8601600
217393743 dasarashirisha2004 D Aug. 6, 2023, 1:42 a.m. OK PyPy 3-64 TESTS 86 249 8601600
217351724 gmunkhbaatarmn D Aug. 5, 2023, 4:34 p.m. OK PyPy 3-64 TESTS 86 265 6041600
217355896 b-baka D Aug. 5, 2023, 5:24 p.m. OK PyPy 3-64 TESTS 86 265 7577600
217384159 hvbird D Aug. 5, 2023, 9:59 p.m. OK PyPy 3-64 TESTS 86 265 9830400
217359106 Haire D Aug. 5, 2023, 5:38 p.m. OK PyPy 3-64 TESTS 86 296 138547200
217371937 Ayush___ D Aug. 5, 2023, 7:19 p.m. OK PyPy 3-64 TESTS 86 608 21913600
217381732 kostylevGO D Aug. 5, 2023, 9:15 p.m. OK Rust 2021 TESTS 86 93 0
217397266 sansen D Aug. 6, 2023, 2:47 a.m. OK Rust 2021 TESTS 86 108 0

remove filters

Back to search problems