Codeforces Round 538 (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
1114 Codeforces Round 538 (Div. 2) FINISHED False 7200 187631687 Feb. 10, 2019, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2916 ) E Arithmetic Progression PROGRAMMING binary search interactive number theory probabilities 2100

B'This is an interactive problem! An arithmetic progression or arithmetic sequence is a sequence of integers such that the subtraction of element with its previous element ( x_i - x_{i - 1} , where i ge 2 ) is constant -- such difference is called a common difference of the sequence. That is, an arithmetic progression is a sequence of form x_i = x_1 + (i - 1) d , where d is a common difference of the sequence. There is a secret list of n integers a_1, a_2, ldots, a_n . It is guaranteed that all elements a_1, a_2, ldots, a_n are between 0 and 10^9 , inclusive. This list is special: if sorted in increasing order, it will form an arithmetic progression with positive common difference ( d > 0 ). For example, the list [14, 24, 9, 19] satisfies this requirement, after sorting it makes a list [9, 14, 19, 24] , which can be produced as x_n = 9 + 5 cdot (n - 1) . Also you are also given a device, which has a quite discharged battery, thus you can only use it to perform at most 60 queries of following two types: Your can use this special device for at most 60 queries. Could you please find out the smallest element and the common difference of the sequence? That is, values x_1 and d in the definition of the arithmetic progression. Note that the array a is not sorted. The interaction starts with a single integer n ( 2 <= n <= 10^6 ), the size of the list of integers. Then you can make queries of two types: After the query read its result r as an integer. When you find out what the smallest element x_1 and common difference d , print And quit after that. This query is not counted towards the 60 queries limit. After printing any query do not forget to output end of line and flush the output. Otherwise you will get Idleness limit exceeded. To do this, use: Hacks For hack, use the following format: The first line should contain an intege'...

Tutorials

Codeforces Round #538 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
49929502 Ejecutante E Feb. 15, 2019, 3:13 a.m. OK Clang++17 Diagnostics TESTS 112 62 2150400 2100
52013456 jamienguyen E March 30, 2019, 9:32 a.m. OK FPC TESTS 112 46 307200 2100
50733409 Mint_Dentifrice E March 3, 2019, 11:51 a.m. OK FPC TESTS 112 46 9011200 2100
49782850 Chipe1 E Feb. 11, 2019, 6:17 p.m. OK GNU C11 TESTS 112 46 3993600 2100
49807102 rainboy E Feb. 11, 2019, 8:34 p.m. OK GNU C11 TESTS 112 78 3993600 2100
59444283 tyakennikku E Aug. 25, 2019, 12:38 p.m. OK GNU C++11 TESTS 112 31 0 2100
59218635 DXTsT E Aug. 21, 2019, 11:22 a.m. OK GNU C++11 TESTS 112 31 0 2100
58143777 David_Garcia E Aug. 1, 2019, 7:34 p.m. OK GNU C++11 TESTS 112 31 0 2100
57833875 luogu_bot4 E July 27, 2019, 6:55 a.m. OK GNU C++11 TESTS 112 31 0 2100
60516924 ironmt E Sept. 14, 2019, 7:02 a.m. OK GNU C++11 TESTS 112 31 0 2100
57833622 ABCD_cpp E July 27, 2019, 6:51 a.m. OK GNU C++11 TESTS 112 31 0 2100
60218600 haiwenhan.IterType E Sept. 7, 2019, 12:44 p.m. OK GNU C++11 TESTS 112 31 0 2100
60217385 cxccxc E Sept. 7, 2019, 12:19 p.m. OK GNU C++11 TESTS 112 31 0 2100
60217330 aqua233 E Sept. 7, 2019, 12:18 p.m. OK GNU C++11 TESTS 112 31 0 2100
59815516 mrgreen E Aug. 31, 2019, 3:09 p.m. OK GNU C++11 TESTS 112 31 0 2100
68339460 NamSPro E Jan. 7, 2020, 2:03 a.m. OK GNU C++14 TESTS 112 31 0 2100
68138620 MuhammedAbdalla E Jan. 3, 2020, 8:22 p.m. OK GNU C++14 TESTS 112 31 0 2100
63953123 naman_jain_2202 E Oct. 31, 2019, 11 p.m. OK GNU C++14 TESTS 112 31 0 2100
58480357 HouZAJ E Aug. 9, 2019, 5:13 a.m. OK GNU C++14 TESTS 112 31 0 2100
57095321 vjudge1 E July 15, 2019, 12:04 p.m. OK GNU C++14 TESTS 112 31 0 2100
55275273 madhav_1999 E June 7, 2019, 6:37 p.m. OK GNU C++14 TESTS 112 31 0 2100
54469188 zsbenn E May 22, 2019, 3:44 a.m. OK GNU C++14 TESTS 112 31 0 2100
53465085 cryptoshawon E April 28, 2019, 9:33 a.m. OK GNU C++14 TESTS 112 31 0 2100
68888494 vjudge4 E Jan. 16, 2020, 12:17 a.m. OK GNU C++14 TESTS 112 31 0 2100
68891433 860579 E Jan. 16, 2020, 2:29 a.m. OK GNU C++14 TESTS 112 31 0 2100
57448691 square1001 E July 21, 2019, 9:01 a.m. OK GNU C++17 TESTS 112 31 0 2100
67023772 thedragonslayer E Dec. 16, 2019, 1:45 p.m. OK GNU C++17 TESTS 112 31 0 2100
65499296 rp_o_02 E Nov. 21, 2019, 6:02 p.m. OK GNU C++17 TESTS 112 31 0 2100
64705146 krasav4ik E Nov. 11, 2019, 4:12 p.m. OK GNU C++17 TESTS 112 31 0 2100
64665227 _Samir E Nov. 11, 2019, 1:26 a.m. OK GNU C++17 TESTS 112 31 0 2100
64302984 dontquit E Nov. 5, 2019, 10:40 a.m. OK GNU C++17 TESTS 112 31 0 2100
59560852 Fortin E Aug. 27, 2019, 8:27 a.m. OK GNU C++17 TESTS 112 31 0 2100
58326253 tummal geckods E Aug. 5, 2019, 7:52 a.m. OK GNU C++17 TESTS 112 31 0 2100
54866558 TooNewbie E May 31, 2019, 6:35 a.m. OK GNU C++17 TESTS 112 31 0 2100
54656563 WhiteSpot E May 26, 2019, 8:42 a.m. OK GNU C++17 TESTS 112 31 0 2100
54077642 Hemose E May 13, 2019, 10 p.m. OK Java 8 TESTS 112 124 0 2100
49960779 boltUsain E Feb. 15, 2019, 6:04 p.m. OK Java 8 TESTS 112 124 0 2100
49904631 Deimos E Feb. 14, 2019, 11:20 a.m. OK Java 8 TESTS 112 124 0 2100
49904176 Tarun E Feb. 14, 2019, 11:06 a.m. OK Java 8 TESTS 112 124 0 2100
49860405 Anonymous E Feb. 13, 2019, 9:12 a.m. OK Java 8 TESTS 112 124 0 2100
49813446 poketred12 E Feb. 12, 2019, 3:36 a.m. OK Java 8 TESTS 112 124 0 2100
49784683 anony9906 E Feb. 11, 2019, 7:11 p.m. OK Java 8 TESTS 112 124 0 2100
49763631 xodiac E Feb. 11, 2019, 10:28 a.m. OK Java 8 TESTS 112 124 0 2100
49752083 aman28rwt E Feb. 11, 2019, 3:33 a.m. OK Java 8 TESTS 112 124 0 2100
49915073 mTvTm E Feb. 14, 2019, 4:05 p.m. OK Java 8 TESTS 112 139 0 2100
62089921 Spheniscine E Oct. 8, 2019, 5:02 a.m. OK Kotlin TESTS 112 187 1126400 2100
62092089 Spheniscine E Oct. 8, 2019, 6:15 a.m. OK Kotlin TESTS 112 202 1126400 2100
61893839 Spheniscine E Oct. 5, 2019, 6:39 a.m. OK Kotlin TESTS 112 233 1024000 2100
61101532 Spheniscine E Sept. 23, 2019, 7:03 a.m. OK Kotlin TESTS 112 374 20684800 2100
62091245 Spheniscine E Oct. 8, 2019, 5:47 a.m. OK Kotlin TESTS 112 452 1536000 2100
49922823 HosseinHadi E Feb. 14, 2019, 8:01 p.m. OK Mono C# TESTS 112 62 0 2100
49769798 leign E Feb. 11, 2019, 1:11 p.m. OK Mono C# TESTS 112 77 0 2100
54861399 camypaper E May 31, 2019, 2:22 a.m. OK Mono C# TESTS 112 77 102400 2100
49761970 selpo E Feb. 11, 2019, 9:29 a.m. OK Mono C# TESTS 112 77 3584000 2100
49890829 aytal.d E Feb. 14, 2019, 3:28 a.m. OK MS C++ TESTS 112 31 0 2100
50017101 art1smagnae E Feb. 16, 2019, 5:31 p.m. OK MS C++ 2017 TESTS 112 31 0 2100
49940086 kappere E Feb. 15, 2019, 9:11 a.m. OK MS C++ 2017 TESTS 112 31 0 2100
49810943 nomiku99 E Feb. 12, 2019, 12:52 a.m. OK MS C++ 2017 TESTS 112 46 102400 2100
49753445 Timonnable E Feb. 11, 2019, 4:37 a.m. OK MS C++ 2017 TESTS 112 46 204800 2100
49760386 Darooha E Feb. 11, 2019, 8:39 a.m. OK Ocaml TESTS 112 31 0 2100
51930661 c1729 E March 28, 2019, 10:11 a.m. OK PyPy 2 TESTS 112 140 102400 2100
49926103 ryanr1230 E Feb. 14, 2019, 10:46 p.m. OK PyPy 2 TESTS 112 155 921600 2100
51815374 c1729 E March 25, 2019, 8:50 a.m. OK PyPy 2 TESTS 112 155 1024000 2100
51814355 Mukundan314 E March 25, 2019, 8:10 a.m. OK PyPy 2 TESTS 112 155 1024000 2100
51814038 Mukundan314 E March 25, 2019, 7:58 a.m. OK PyPy 2 TESTS 112 155 1024000 2100
51346419 c1729 E March 15, 2019, 6:42 p.m. OK PyPy 2 TESTS 112 155 1024000 2100
51814774 c1729 E March 25, 2019, 8:26 a.m. OK PyPy 2 TESTS 112 155 1126400 2100
51831260 c1729 E March 25, 2019, 4:18 p.m. OK PyPy 2 TESTS 112 156 1024000 2100
49850590 aeternalis1 E Feb. 13, 2019, 3:11 a.m. OK PyPy 2 TESTS 112 156 1024000 2100
51914074 c1729 E March 27, 2019, 8:02 p.m. OK PyPy 2 TESTS 112 156 1126400 2100
51988065 c1729 E March 29, 2019, 6:28 p.m. OK PyPy 3 TESTS 112 140 0 2100
51951138 c1729 E March 28, 2019, 8:18 p.m. OK PyPy 3 TESTS 112 140 0 2100
51913282 algmyr E March 27, 2019, 7:32 p.m. OK PyPy 3 TESTS 112 140 0 2100
51967460 c1729 E March 29, 2019, 10:44 a.m. OK PyPy 3 TESTS 112 155 0 2100
51965908 c1729 E March 29, 2019, 9:55 a.m. OK PyPy 3 TESTS 112 155 102400 2100
51939026 c1729 E March 28, 2019, 1:42 p.m. OK PyPy 3 TESTS 112 155 102400 2100
51913295 c1729 E March 27, 2019, 7:32 p.m. OK PyPy 3 TESTS 112 155 102400 2100
51913173 c1729 E March 27, 2019, 7:27 p.m. OK PyPy 3 TESTS 112 155 102400 2100
51913684 algmyr E March 27, 2019, 7:48 p.m. OK PyPy 3 TESTS 112 156 0 2100
67395437 Aloha E Dec. 21, 2019, 10:28 p.m. OK PyPy 3 TESTS 112 529 11059200 2100
49920326 idgaf E Feb. 14, 2019, 6:30 p.m. OK Python 2 TESTS 112 218 307200 2100
49764152 gatsko E Feb. 11, 2019, 10:46 a.m. OK Python 2 TESTS 112 218 512000 2100
49879165 Luxo E Feb. 13, 2019, 5:17 p.m. OK Python 2 TESTS 112 686 16998400 2100
51967468 c1729 E March 29, 2019, 10:45 a.m. OK Python 3 TESTS 112 139 307200 2100
59394828 Sevlll E Aug. 24, 2019, 9:55 a.m. OK Python 3 TESTS 112 155 512000 2100
50225510 NocturneBflat E Feb. 20, 2019, 7:10 a.m. OK Python 3 TESTS 112 155 512000 2100
49984537 CountZero E Feb. 16, 2019, 9:54 a.m. OK Python 3 TESTS 112 155 512000 2100
49853248 ConanYu E Feb. 13, 2019, 5:36 a.m. OK Python 3 TESTS 112 155 512000 2100
49762483 amirah E Feb. 11, 2019, 9:45 a.m. OK Python 3 TESTS 112 155 512000 2100
59969498 FlyingBag65 E Sept. 3, 2019, 11:30 p.m. OK Python 3 TESTS 112 156 512000 2100
53311615 365050244 E April 26, 2019, 7:13 a.m. OK Python 3 TESTS 112 156 512000 2100
49764068 c1729 E Feb. 11, 2019, 10:43 a.m. OK Python 3 TESTS 112 156 512000 2100
49757119 pineriver E Feb. 11, 2019, 7:02 a.m. OK Python 3 TESTS 112 156 512000 2100
49899338 armoking E Feb. 14, 2019, 8:32 a.m. OK Ruby TESTS 112 77 0 2100
63668491 sansen E Oct. 28, 2019, 4:08 p.m. OK Rust TESTS 112 31 0 2100
49979478 Chenyao E Feb. 16, 2019, 7:36 a.m. OK Rust TESTS 112 46 0 2100
50073506 yakamoto E Feb. 17, 2019, 7:19 p.m. OK Scala TESTS 112 483 0 2100

remove filters

Back to search problems