Codeforces Round 859 (Div. 4)

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
1807 Codeforces Round 859 (Div. 4) FINISHED False 8100 58028663 March 19, 2023, 2:55 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13762 ) E Interview PROGRAMMING binary search implementation interactive

B'This is an interactive problem. If you are unsure how interactive problems work, then it is recommended to read the guide for participants. Before the last stage of the exam, the director conducted an interview. He gave Gon n piles of stones, the i -th pile having a_i stones. Each stone is identical and weighs 1 grams, except for one special stone that is part of an unknown pile and weighs 2 grams. Gon can only ask the director questions of one kind: he can choose k piles, and the director will tell him the total weight of the piles chosen. More formally, Gon can choose an integer k ( 1 <= q k <= q n ) and k unique piles p_1, p_2, ... , p_k ( 1 <= q p_i <= q n ), and the director will return the total weight m_{p_1} + m_{p_2} + ... + m_{p_k} , where m_i denotes the weight of pile i . Gon is tasked with finding the pile that contains the special stone. However, the director is busy. Help Gon find this pile in at most mathbf{30} queries. The input data contains several test cases. The first line contains one integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q 2 cdot 10^5 ) -- the number of piles. The second line of each test case contains n integers a_i ( 1 <= q a_i <= q 10^4 ) -- the number of stones in each pile. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . After reading the input for each test case, proceed with the interaction as follows. You can perform the operation at most mathbf{30} times to guess the pile. To make a guess, print a line with the following format: When you know the index of the pile with the special stone, print one line in the following format: texttt{!} m ( 1 <= q m <= q n ). After that, move on to the ne'...

Tutorials

114143

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
198263218 ruban E March 19, 2023, 5:56 p.m. OK FPC TESTS 16 546 25804800
198280474 Frozenrate E March 19, 2023, 8:24 p.m. OK GNU C++14 TESTS 16 77 819200
198295165 Dghemy E March 20, 2023, 1:21 a.m. OK GNU C++14 TESTS 16 78 1638400
198268329 et3rnal24 E March 19, 2023, 6:28 p.m. OK GNU C++14 TESTS 16 78 1638400
198267851 DNHIA E March 19, 2023, 6:24 p.m. OK GNU C++14 TESTS 16 78 3174400
198304900 RongDuJiKsp E March 20, 2023, 3:31 a.m. OK GNU C++14 TESTS 16 93 819200
198295195 lvvqiao E March 20, 2023, 1:21 a.m. OK GNU C++14 TESTS 16 93 819200
198267959 MySelfPurple E March 19, 2023, 6:25 p.m. OK GNU C++14 TESTS 16 93 819200
198315228 anurag0005 E March 20, 2023, 5:47 a.m. OK GNU C++14 TESTS 16 93 1638400
198310639 Kanna_STELLA E March 20, 2023, 4:52 a.m. OK GNU C++14 TESTS 16 93 1638400
198265335 suman_061 E March 19, 2023, 6:09 p.m. OK GNU C++14 TESTS 16 93 1638400
198274589 abdallahmontaser E March 19, 2023, 7:19 p.m. OK GNU C++17 TESTS 16 62 1638400
198263308 itsrohit E March 19, 2023, 5:57 p.m. OK GNU C++17 TESTS 16 77 819200
198299217 Fovait E March 20, 2023, 1:39 a.m. OK GNU C++17 TESTS 16 77 1638400
198276178 bdhanush E March 19, 2023, 7:34 p.m. OK GNU C++17 TESTS 16 77 1638400
198265209 Mahmoud_Qassem E March 19, 2023, 6:08 p.m. OK GNU C++17 TESTS 16 77 2457600
198291632 Yash_04k E March 19, 2023, 11:55 p.m. OK GNU C++17 TESTS 16 77 3174400
198270827 YouKnowWhoIsBack E March 19, 2023, 6:47 p.m. OK GNU C++17 TESTS 16 77 3174400
198264988 coder_pulkit_s E March 19, 2023, 6:07 p.m. OK GNU C++17 TESTS 16 77 4812800
198304329 Ridwan_Islam E March 20, 2023, 3:21 a.m. OK GNU C++17 TESTS 16 78 1638400
198264074 hussainmohamed E March 19, 2023, 6:01 p.m. OK GNU C++17 TESTS 16 78 2355200
198290686 omar_mahmoud1 E March 19, 2023, 11:31 p.m. OK GNU C++17 (64) TESTS 16 46 3174400
198294898 Maginy_ZYX E March 20, 2023, 1:15 a.m. OK GNU C++17 (64) TESTS 16 61 1024000
198275781 iamarman E March 19, 2023, 7:30 p.m. OK GNU C++17 (64) TESTS 16 62 819200
198316257 iamarman E March 20, 2023, 5:59 a.m. OK GNU C++17 (64) TESTS 16 77 819200
198291843 HideOneMan2002 E March 20, 2023, midnight OK GNU C++17 (64) TESTS 16 77 1024000
198284849 Agamenon E March 19, 2023, 9:25 p.m. OK GNU C++17 (64) TESTS 16 77 3174400
198271211 SandAuddy755 E March 19, 2023, 6:50 p.m. OK GNU C++17 (64) TESTS 16 77 3174400
198261784 codingsuju E March 19, 2023, 5:48 p.m. OK GNU C++17 (64) TESTS 16 77 3174400
198262421 samagra1 E March 19, 2023, 5:52 p.m. OK GNU C++17 (64) TESTS 16 77 36864000
198300824 narrowkind E March 20, 2023, 2:14 a.m. OK GNU C++17 (64) TESTS 16 78 1843200
198268558 anandk543 E March 19, 2023, 6:30 p.m. OK GNU C++20 (64) TESTS 16 46 819200
198262303 AlexJzG E March 19, 2023, 5:51 p.m. OK GNU C++20 (64) TESTS 16 46 819200
198261834 adityaprakash12 E March 19, 2023, 5:49 p.m. OK GNU C++20 (64) TESTS 16 46 1638400
198261788 Negm E March 19, 2023, 5:48 p.m. OK GNU C++20 (64) TESTS 16 46 1638400
198293323 Sa7afy_H333 E March 20, 2023, 12:37 a.m. OK GNU C++20 (64) TESTS 16 46 1843200
198272596 muntasir__ E March 19, 2023, 7:01 p.m. OK GNU C++20 (64) TESTS 16 46 3174400
198294625 yousseferrais E March 20, 2023, 1:09 a.m. OK GNU C++20 (64) TESTS 16 61 819200
198309424 saurav_kalsoor E March 20, 2023, 4:38 a.m. OK GNU C++20 (64) TESTS 16 61 1638400
198262559 Negm E March 19, 2023, 5:53 p.m. OK GNU C++20 (64) TESTS 16 61 1638400
198311994 BibarysK E March 20, 2023, 5:07 a.m. OK GNU C++20 (64) TESTS 16 61 3174400
198270567 harsh.awasthi E March 19, 2023, 6:45 p.m. OK Go TESTS 16 140 4710400
198263780 wilcot E March 19, 2023, 6 p.m. OK Go TESTS 16 202 10137600
198284790 ETHANHUNTMI5 E March 19, 2023, 9:24 p.m. OK Java 11 TESTS 16 374 0
198265919 princeayush04 E March 19, 2023, 6:12 p.m. OK Java 11 TESTS 16 389 0
198262204 testing_arnav E March 19, 2023, 5:50 p.m. OK Java 11 TESTS 16 436 0
198275802 etian6795 E March 19, 2023, 7:30 p.m. OK Java 11 TESTS 16 857 0
198289619 PlayDate E March 19, 2023, 11:04 p.m. OK Java 11 TESTS 16 1060 0
198314093 bleach__ E March 20, 2023, 5:33 a.m. OK Java 17 TESTS 16 390 13926400
198284743 bunny06 E March 19, 2023, 9:23 p.m. OK Java 17 TESTS 16 467 614400
198289324 ahmedtawfik E March 19, 2023, 10:57 p.m. OK Java 17 TESTS 16 811 7065600
198264502 Badass_Nemesis E March 19, 2023, 6:04 p.m. OK Java 17 TESTS 16 842 614400
198316351 Danger_Don E March 20, 2023, 6 a.m. OK Java 17 TESTS 16 888 512000
198306791 Suraj1607 E March 20, 2023, 4:01 a.m. OK Java 17 TESTS 16 888 512000
198290570 j4cobi E March 19, 2023, 11:28 p.m. OK Java 17 TESTS 16 1201 921600
198294188 yuanli E March 20, 2023, 12:59 a.m. OK Java 8 TESTS 16 280 307200
198273467 Omar.Nour E March 19, 2023, 7:09 p.m. OK Java 8 TESTS 16 311 13312000
198273819 Pranav3926 E March 19, 2023, 7:12 p.m. OK Java 8 TESTS 16 343 1945600
198261645 soyebsarkar E March 19, 2023, 5:48 p.m. OK Java 8 TESTS 16 358 3174400
198270047 AS_1729 E March 19, 2023, 6:41 p.m. OK Java 8 TESTS 16 373 65024000
198270257 Ziran3234 E March 19, 2023, 6:42 p.m. OK Java 8 TESTS 16 374 4608000
198275718 SuchayK E March 19, 2023, 7:30 p.m. OK Java 8 TESTS 16 514 0
198277772 rohit_8469 E March 19, 2023, 7:51 p.m. OK Java 8 TESTS 16 608 0
198275434 Golovanov399 E March 19, 2023, 7:27 p.m. OK Kotlin 1.7 TESTS 16 1138 103628800
198279456 mohamedzarea29 E March 19, 2023, 8:12 p.m. OK Kotlin 1.7 TESTS 16 1372 113254400
198314083 Smallorange E March 20, 2023, 5:33 a.m. OK MS C++ 2017 TESTS 16 342 2457600
198270432 b-baka E March 19, 2023, 6:43 p.m. OK PyPy 3 TESTS 16 389 18739200
198294004 ikoma E March 20, 2023, 12:54 a.m. OK PyPy 3 TESTS 16 467 19558400
198264822 Programmerryoki E March 19, 2023, 6:05 p.m. OK PyPy 3-64 TESTS 16 248 25907200
198312393 Rohan_7503 E March 20, 2023, 5:12 a.m. OK PyPy 3-64 TESTS 16 295 26214400
198279738 uni- E March 19, 2023, 8:15 p.m. OK PyPy 3-64 TESTS 16 295 26419200
198279794 uni- E March 19, 2023, 8:16 p.m. OK PyPy 3-64 TESTS 16 296 26112000
198269541 DarkTemplarDrop E March 19, 2023, 6:37 p.m. OK PyPy 3-64 TESTS 16 326 22937600
198267917 kagu E March 19, 2023, 6:25 p.m. OK PyPy 3-64 TESTS 16 327 23347200
198279080 abhaumik24 E March 19, 2023, 8:07 p.m. OK PyPy 3-64 TESTS 16 327 29491200
198268817 Shri_874 E March 19, 2023, 6:31 p.m. OK PyPy 3-64 TESTS 16 342 33075200
198292082 pirate0 E March 20, 2023, 12:06 a.m. OK PyPy 3-64 TESTS 16 343 25292800
198289256 oadey89 E March 19, 2023, 10:55 p.m. OK PyPy 3-64 TESTS 16 358 32460800
198291396 Jocca E March 19, 2023, 11:48 p.m. OK Python 3 TESTS 16 280 16793600
198280547 mediocreaverage E March 19, 2023, 8:25 p.m. OK Python 3 TESTS 16 296 15052800
198294797 berukhov E March 20, 2023, 1:13 a.m. OK Python 3 TESTS 16 311 14028800
198273693 BurntToast E March 19, 2023, 7:11 p.m. OK Python 3 TESTS 16 327 14131200
198284764 jamerrq E March 19, 2023, 9:23 p.m. OK Python 3 TESTS 16 358 15462400
198309986 2100031199cseh E March 20, 2023, 4:45 a.m. OK Python 3 TESTS 16 404 14131200
198281157 sohamm20 E March 19, 2023, 8:33 p.m. OK Python 3 TESTS 16 405 14131200
198272661 naolz E March 19, 2023, 7:02 p.m. OK Python 3 TESTS 16 405 14336000
198292747 kanth_7 E March 20, 2023, 12:23 a.m. OK Python 3 TESTS 16 420 14336000
198276208 PythonIsGodlike E March 19, 2023, 7:34 p.m. OK Python 3 TESTS 16 421 17408000

remove filters

Back to search problems