Codeforces Round 878 (Div. 3)

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
1840 Codeforces Round 878 (Div. 3) FINISHED False 8100 51204263 June 6, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1007 ) G2 In Search of Truth (Hard Version) PROGRAMMING constructive algorithms interactive math probabilities

B'The only difference between easy and hard versions is the maximum number of queries. In this version, you are allowed to ask at most 1000 queries. This is an interactive problem. You are playing a game. The circle is divided into n sectors, sectors are numbered from 1 to n in some order. You are in the adjacent room and do not know either the number of sectors or their numbers. There is also an arrow that initially points to some sector. Initially, the host tells you the number of the sector to which the arrow points. After that, you can ask the host to move the arrow k sectors counterclockwise or clockwise at most 1000 times. And each time you are told the number of the sector to which the arrow points. Your task is to determine the integer n -- the number of sectors in at most 1000 queries. It is guaranteed that 1 <= n <= 10^6 . The input consists of a single integer x ( 1 <= x <= n ) -- the number of the initial sector. After you determine the integer n -- the number of sectors, you should output "! n" ( 1 <= n <= 10^6 ). After that the program should immediately terminate. Note that, printing the answer does not count as a query. It is guaranteed that the integer n and the numbers of the sectors are fixed initially and will not be changed by the jury program depending on the queries. After reading the description of the input, you may ask queries. Queries can be of two types: After each query, you should read an integer x ( 1 <= x <= n ) -- the number of the current sector to which the arrow points. You are allowed to make at most 1000 queries in total. If you make too many queries, you will get Wrong answer. After printing a query or the answer, do not forget to output a the end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use: Hacks To hack, use the following test format. In the first line, outp'...

Tutorials

Codeforces Round #878 (Div.3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
208850395 Hritik12 G2 June 7, 2023, 4:07 a.m. OK GNU C++14 TESTS 136 31 0
208840374 zltzlt G2 June 7, 2023, 12:22 a.m. OK GNU C++14 TESTS 136 31 0
208839072 zltzlt G2 June 6, 2023, 11:24 p.m. OK GNU C++14 TESTS 136 31 0
208838651 ayman01287985950 G2 June 6, 2023, 11:06 p.m. OK GNU C++14 TESTS 136 31 204800
208815766 Cu_OH_2 G2 June 6, 2023, 5:08 p.m. OK GNU C++14 TESTS 136 31 204800
208857037 xxxzy G2 June 7, 2023, 5:51 a.m. OK GNU C++14 TESTS 142 31 3993600
208842208 _anodiebird G2 June 7, 2023, 1:25 a.m. OK GNU C++14 TESTS 136 31 7987200
208846044 why_123 G2 June 7, 2023, 2:50 a.m. OK GNU C++14 TESTS 136 31 8806400
208816952 changzhou G2 June 6, 2023, 5:15 p.m. OK GNU C++14 TESTS 136 46 0
208839264 ayman01287985950 G2 June 6, 2023, 11:32 p.m. OK GNU C++14 TESTS 136 46 204800
208831059 yellowtomato98 G2 June 6, 2023, 7:50 p.m. OK GNU C++17 TESTS 136 30 0
208838588 franv G2 June 6, 2023, 11:04 p.m. OK GNU C++17 TESTS 136 30 204800
208851760 hy2004 G2 June 7, 2023, 4:30 a.m. OK GNU C++17 TESTS 136 31 0
208857577 Chahel G2 June 7, 2023, 5:58 a.m. OK GNU C++17 TESTS 142 31 204800
208857461 Chahel G2 June 7, 2023, 5:56 a.m. OK GNU C++17 TESTS 142 31 204800
208850905 phattd G2 June 7, 2023, 4:16 a.m. OK GNU C++17 TESTS 136 31 204800
208848697 OG_ATrue G2 June 7, 2023, 3:38 a.m. OK GNU C++17 TESTS 136 31 204800
208842448 jdurie G2 June 7, 2023, 1:31 a.m. OK GNU C++17 TESTS 136 31 204800
208830927 ikaurov G2 June 6, 2023, 7:48 p.m. OK GNU C++17 TESTS 136 31 204800
208816638 BloCamLimb G2 June 6, 2023, 5:13 p.m. OK GNU C++17 TESTS 136 31 204800
208850623 Mateo.Noel G2 June 7, 2023, 4:11 a.m. OK GNU C++17 (64) TESTS 136 31 0
208850304 Mateo.Noel G2 June 7, 2023, 4:06 a.m. OK GNU C++17 (64) TESTS 136 31 0
208845232 MattTheNub G2 June 7, 2023, 2:34 a.m. OK GNU C++17 (64) TESTS 136 31 0
208844309 enslaved G2 June 7, 2023, 2:16 a.m. OK GNU C++17 (64) TESTS 136 31 0
208839970 ht_Z G2 June 7, 2023, 12:03 a.m. OK GNU C++17 (64) TESTS 136 31 0
208816098 iLLusio G2 June 6, 2023, 5:10 p.m. OK GNU C++17 (64) TESTS 136 31 0
208814484 MaGnsi0 G2 June 6, 2023, 5:01 p.m. OK GNU C++17 (64) TESTS 136 31 0
208839487 TheScrasse G2 June 6, 2023, 11:41 p.m. OK GNU C++17 (64) TESTS 136 31 102400
208820326 Sy_03 G2 June 6, 2023, 5:41 p.m. OK GNU C++17 (64) TESTS 136 31 307200
208845386 gqf123 G2 June 7, 2023, 2:37 a.m. OK GNU C++17 (64) TESTS 136 31 3993600
208854584 TsumikiMikan G2 June 7, 2023, 5:15 a.m. OK GNU C++20 (64) TESTS 136 15 0
208821785 Kidding__Ma G2 June 6, 2023, 5:54 p.m. OK GNU C++20 (64) TESTS 136 15 0
208819102 silxi G2 June 6, 2023, 5:30 p.m. OK GNU C++20 (64) TESTS 136 15 0
208829209 angelachang27 G2 June 6, 2023, 7:21 p.m. OK GNU C++20 (64) TESTS 136 15 307200
208825590 piyush_pransukhka G2 June 6, 2023, 6:32 p.m. OK GNU C++20 (64) TESTS 136 30 0
208815135 Kira_1234 G2 June 6, 2023, 5:04 p.m. OK GNU C++20 (64) TESTS 136 30 0
208814347 ZrjaK G2 June 6, 2023, 5 p.m. OK GNU C++20 (64) TESTS 136 30 0
208857206 StarSilk G2 June 7, 2023, 5:53 a.m. OK GNU C++20 (64) TESTS 142 31 0
208856519 jiangly G2 June 7, 2023, 5:43 a.m. OK GNU C++20 (64) TESTS 142 31 0
208855296 medmdgm G2 June 7, 2023, 5:26 a.m. OK GNU C++20 (64) TESTS 136 31 0
208842979 0x3F G2 June 7, 2023, 1:44 a.m. OK Go TESTS 136 62 307200
208842842 0x3F G2 June 7, 2023, 1:41 a.m. OK Go TESTS 136 62 307200
208825908 Dukkha G2 June 6, 2023, 6:36 p.m. OK Java 17 TESTS 136 373 1331200
208826694 Dukkha G2 June 6, 2023, 6:46 p.m. OK Java 17 TESTS 136 421 1433600
208814453 hacker70 G2 June 6, 2023, 5:01 p.m. OK PyPy 3 TESTS 136 264 5939200
208847546 424479543 G2 June 7, 2023, 3:18 a.m. OK PyPy 3-64 TESTS 136 124 2252800
208854679 parthtotalfun G2 June 7, 2023, 5:16 a.m. OK PyPy 3-64 TESTS 136 140 1638400
208848615 424479543 G2 June 7, 2023, 3:36 a.m. OK PyPy 3-64 TESTS 136 140 3481600
208842399 sunhokim G2 June 7, 2023, 1:30 a.m. OK PyPy 3-64 TESTS 136 155 3072000
208838355 pythonist_viking G2 June 6, 2023, 10:54 p.m. OK PyPy 3-64 TESTS 136 155 3174400
208848175 424479543 G2 June 7, 2023, 3:29 a.m. OK PyPy 3-64 TESTS 136 155 4915200
208829863 sos89756 G2 June 6, 2023, 7:31 p.m. OK PyPy 3-64 TESTS 136 170 4812800
208829542 sos89756 G2 June 6, 2023, 7:26 p.m. OK PyPy 3-64 TESTS 136 171 4608000
208826069 Antonio_Colapso_07 G2 June 6, 2023, 6:38 p.m. OK PyPy 3-64 TESTS 136 171 4915200

remove filters

Back to search problems