Codeforces Round 551 (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
1153 Codeforces Round 551 (Div. 2) FINISHED False 7200 182361323 April 13, 2019, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1517 ) E Serval and Snake PROGRAMMING binary search brute force interactive 2100

B"This is an interactive problem. Now Serval is a senior high school student in Japari Middle School. However, on the way to the school, he must go across a pond, in which there is a dangerous snake. The pond can be represented as a n x n grid. The snake has a head and a tail in different cells, and its body is a series of adjacent cells connecting the head and the tail without self-intersecting. If Serval hits its head or tail, the snake will bite him and he will die. Luckily, he has a special device which can answer the following question: you can pick a rectangle, it will tell you the number of times one needs to cross the border of the rectangle walking cell by cell along the snake from the head to the tail. The pictures below show a possible snake and a possible query to it, which will get an answer of 4 . Today Serval got up too late and only have time to make 2019 queries. As his best friend, can you help him find the positions of the head and the tail? Note that two cells are adjacent if and only if they have a common edge in the grid, and a snake can have a body of length 0 , that means it only has adjacent head and tail. Also note that the snake is sleeping, so it won't move while Serval using his device. And what's obvious is that the snake position does not depend on your queries. The first line contains a single integer n ( 2 <= q n <= q 1000 ) -- the size of the grid. When you are ready to answer, you should print ! x1 y1 x2 y2, where (x_1, y_1) represents the position of the head and (x_2,y_2) represents the position of the tail. You can print head and tail in any order. To make a query, you should print ? x1 y1 x2 y2 ( 1 <= q x_1 <= q x_2 <= q n , 1 <= q y_1 <= q y_2 <= q n ), representing a rectangle consisting of all cells (x,y) such that x_1 <= q x <= q x_2 and y_1 <= q y <= q y_2 . You will get a single integer as the answer. After printing a query, do not forget t"...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52723042 revpro E April 13, 2019, 9:11 p.m. OK Clang++17 Diagnostics TESTS 88 140 0 2100
52752122 iica E April 14, 2019, 2:38 p.m. OK D TESTS 88 78 102400 2100
52748585 TheHedgehog E April 14, 2019, 12:54 p.m. OK Delphi TESTS 88 77 23142400 2100
54280225 MYNAMEISSHARIFUL E May 17, 2019, 1:02 p.m. OK GNU C11 TESTS 88 62 0 2100
61548418 luogu_bot4 E Sept. 30, 2019, 11:26 a.m. OK GNU C++11 TESTS 88 46 0 2100
60466637 tanao030801 E Sept. 13, 2019, 2:15 a.m. OK GNU C++11 TESTS 88 46 0 2100
59650011 lz.askey E Aug. 29, 2019, 7:47 a.m. OK GNU C++11 TESTS 88 46 0 2100
58378072 YLWang E Aug. 6, 2019, 8:55 a.m. OK GNU C++11 TESTS 88 46 0 2100
58378024 YLWang E Aug. 6, 2019, 8:54 a.m. OK GNU C++11 TESTS 88 46 0 2100
58231561 IgoRamli E Aug. 3, 2019, 5:05 p.m. OK GNU C++11 TESTS 88 46 0 2100
58227236 vjudge5 E Aug. 3, 2019, 3 p.m. OK GNU C++11 TESTS 88 46 0 2100
57894119 triple__a E July 28, 2019, 12:54 p.m. OK GNU C++11 TESTS 88 46 0 2100
68953018 ariloc E Jan. 16, 2020, 6:46 p.m. OK GNU C++11 TESTS 88 46 0 2100
60715378 ZUTTER_ E Sept. 17, 2019, 10:23 a.m. OK GNU C++11 TESTS 88 46 0 2100
52716171 orz_wmg E April 13, 2019, 5:32 p.m. OK GNU C++14 TESTS 88 31 12083200 2100
60659190 Soul_Full_Of_Thunder E Sept. 16, 2019, 3:11 a.m. OK GNU C++14 TESTS 88 46 0 2100
68140769 860579 E Jan. 3, 2020, 10:13 p.m. OK GNU C++14 TESTS 88 46 0 2100
62421692 lclpsoz E Oct. 12, 2019, 1:09 p.m. OK GNU C++14 TESTS 88 46 0 2100
62421526 lclpsoz E Oct. 12, 2019, 1:06 p.m. OK GNU C++14 TESTS 88 46 0 2100
60959984 ak532 E Sept. 21, 2019, 4:55 a.m. OK GNU C++14 TESTS 88 46 0 2100
60659968 Soul_Full_Of_Thunder E Sept. 16, 2019, 3:55 a.m. OK GNU C++14 TESTS 88 46 0 2100
57633786 Immortal_ua E July 24, 2019, 9:48 a.m. OK GNU C++14 TESTS 88 46 0 2100
55127942 Khushboo05 E June 5, 2019, 1:45 p.m. OK GNU C++14 TESTS 88 46 0 2100
54832559 ssxiaohao E May 30, 2019, 9:29 a.m. OK GNU C++14 TESTS 88 46 0 2100
64159533 cuiaoxiang E Nov. 3, 2019, 1:59 p.m. OK GNU C++17 TESTS 88 46 0 2100
55593656 Shayan.Kashefi_A E June 15, 2019, 1:48 p.m. OK GNU C++17 TESTS 88 46 0 2100
53893414 xuanbach E May 9, 2019, 3:13 a.m. OK GNU C++17 TESTS 88 46 0 2100
53866131 pbihao E May 8, 2019, 4:07 a.m. OK GNU C++17 TESTS 88 46 0 2100
53695483 luogu_bot4 E May 3, 2019, 7:30 a.m. OK GNU C++17 TESTS 88 46 0 2100
53695302 Aestus_estus E May 3, 2019, 7:24 a.m. OK GNU C++17 TESTS 88 46 0 2100
53683764 lsubra E May 2, 2019, 9:33 p.m. OK GNU C++17 TESTS 88 46 0 2100
53388430 sash0 E April 27, 2019, 5:30 a.m. OK GNU C++17 TESTS 88 46 0 2100
53303546 lXTobiXl E April 25, 2019, 11:34 p.m. OK GNU C++17 TESTS 88 46 0 2100
65489999 vjudge4 E Nov. 21, 2019, 2:15 p.m. OK GNU C++17 TESTS 88 46 0 2100
52718759 gksato E April 13, 2019, 6:37 p.m. OK Haskell TESTS 88 108 102400 2100
52718557 gksato E April 13, 2019, 6:30 p.m. OK Haskell TESTS 88 124 102400 2100
52734451 Yugioh E April 14, 2019, 5:50 a.m. OK Java 8 TESTS 88 187 0 2100
52874821 icpc_loser E April 16, 2019, 7:01 p.m. OK Java 8 TESTS 88 202 0 2100
52756430 Andres1 E April 14, 2019, 5:17 p.m. OK Java 8 TESTS 88 217 0 2100
52719827 PrakharJain E April 13, 2019, 7:09 p.m. OK Java 8 TESTS 88 218 0 2100
52736740 xodiac E April 14, 2019, 6:52 a.m. OK Java 8 TESTS 88 218 0 2100
52711077 dalt E April 13, 2019, 3:51 p.m. OK Java 8 TESTS 88 218 0 2100
52709608 Shun_PI E April 13, 2019, 3:43 p.m. OK Java 8 TESTS 88 218 0 2100
52736911 StayAwayFromBitches E April 14, 2019, 6:55 a.m. OK Java 8 TESTS 88 233 0 2100
52736974 StayAwayFromBitches E April 14, 2019, 6:57 a.m. OK Java 8 TESTS 88 233 0 2100
52847581 inseder E April 16, 2019, 3:26 p.m. OK Java 8 TESTS 88 234 0 2100
52914051 camypaper E April 17, 2019, 3:09 p.m. OK Mono C# TESTS 88 124 4198400 2100
52702077 TrabajoNocturno E April 13, 2019, 3:06 p.m. OK Mono C# TESTS 88 124 69632000 2100
53046503 S.K E April 20, 2019, 12:27 p.m. OK MS C++ TESTS 88 46 0 2100
53088954 hyacinthusorientalis E April 21, 2019, 10:15 a.m. OK MS C++ TESTS 88 61 0 2100
53174423 qcwlmqy E April 23, 2019, 2:17 a.m. OK MS C++ TESTS 88 61 0 2100
52708887 BaturaDima E April 13, 2019, 3:39 p.m. OK MS C++ TESTS 88 77 0 2100
53499196 carrie17 E April 29, 2019, 1:25 p.m. OK MS C++ 2017 TESTS 88 61 0 2100
52938717 Kucha E April 18, 2019, 8:03 a.m. OK MS C++ 2017 TESTS 88 62 0 2100
52938470 Kucha E April 18, 2019, 7:55 a.m. OK MS C++ 2017 TESTS 88 62 0 2100
52822003 petko_mitkov E April 16, 2019, 12:21 p.m. OK MS C++ 2017 TESTS 88 62 0 2100
53027107 CtrlAlt E April 19, 2019, 7:55 p.m. OK MS C++ 2017 TESTS 88 62 0 2100
52938904 Kucha E April 18, 2019, 8:08 a.m. OK MS C++ 2017 TESTS 88 62 0 2100
52703411 hld67890 E April 13, 2019, 3:12 p.m. OK MS C++ 2017 TESTS 88 77 0 2100
52742942 SendThemToHell E April 14, 2019, 10:07 a.m. OK MS C++ 2017 TESTS 88 77 0 2100
53009084 MenOfPassion E April 19, 2019, 11:11 a.m. OK MS C++ 2017 TESTS 88 77 0 2100
53484375 pajenegod E April 29, 2019, 1:16 a.m. OK PyPy 2 TESTS 88 374 1024000 2100
52821175 yfo E April 16, 2019, 12:02 p.m. OK PyPy 3 TESTS 88 326 1740800 2100
52707369 Spelvin E April 13, 2019, 3:31 p.m. OK PyPy 3 TESTS 88 327 1843200 2100
52719352 Helli.code E April 13, 2019, 6:55 p.m. OK Python 2 TESTS 88 218 0 2100
52718079 Nika86 E April 13, 2019, 6:17 p.m. OK Python 2 TESTS 88 233 0 2100
52748078 Cifko E April 14, 2019, 12:40 p.m. OK Python 2 TESTS 88 264 0 2100
53018765 gatsko E April 19, 2019, 3:27 p.m. OK Python 2 TESTS 88 296 5324800 2100
52954562 enutroh E April 18, 2019, 1:15 p.m. OK Python 3 TESTS 88 186 307200 2100
52763777 _Tachibana_Kanade_ E April 15, 2019, 12:16 a.m. OK Python 3 TESTS 88 186 307200 2100
52752725 foleyfactor E April 14, 2019, 2:58 p.m. OK Python 3 TESTS 88 186 307200 2100
52715557 meooow E April 13, 2019, 5:24 p.m. OK Python 3 TESTS 88 186 307200 2100
52708472 Kiri8128 E April 13, 2019, 3:37 p.m. OK Python 3 TESTS 88 186 307200 2100
52763469 _Tachibana_Kanade_ E April 14, 2019, 11:48 p.m. OK Python 3 TESTS 88 187 307200 2100
52727939 365050244 E April 14, 2019, 2:10 a.m. OK Python 3 TESTS 88 187 307200 2100
52715326 meooow E April 13, 2019, 5:21 p.m. OK Python 3 TESTS 88 187 307200 2100
53832580 Fedos_progaet E May 6, 2019, 9:50 p.m. OK Python 3 TESTS 88 202 307200 2100
52928982 DomiKo E April 17, 2019, 11:20 p.m. OK Python 3 TESTS 88 202 307200 2100
61329190 sansen E Sept. 26, 2019, 2:31 p.m. OK Rust TESTS 88 93 0 2100
52753585 kobae964 E April 14, 2019, 3:26 p.m. OK Rust TESTS 88 93 307200 2100

remove filters

Back to search problems