Codeforces Round 516 (Div. 1, by Moscow Team Olympiad)

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
1063 Codeforces Round 516 (Div. 1, by Moscow Team Olympiad) FINISHED False 7200 236894123 Oct. 14, 2018, 10:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 3275 ) C Dwarves, Hats and Extrasensory Abilities PROGRAMMING binary search constructive algorithms geometry interactive 1900

This is an interactive problem. In good old times dwarves tried to develop extrasensory abilities: Exactly n dwarves entered completely dark cave. Each dwarf received a hat — white or black. While in cave, none of the dwarves was able to see either his own hat or hats of other Dwarves. Dwarves went out of the cave to the meadow and sat at an arbitrary place one after the other. When a dwarf leaves the cave, he sees the colors of all hats of all dwarves that are seating on the meadow (i.e. left the cave before him). However, he is not able to see the color of his own hat and none of the dwarves can give him this information. The task for dwarves was to got diverged into two parts — one with dwarves with white hats and one with black hats. After many centuries, dwarves finally managed to select the right place on the meadow without error. Will you be able to repeat their success? You are asked to successively name n different integer points on the plane. After naming each new point you will be given its color — black or white. Your task is to ensure that the named points can be split by a line in such a way that all points of one color lie on the same side from the line and points of different colors lie on different sides. Moreover, no points can belong to the line. Also, you need to report any such line at the end of the process. In this problem, the interactor is adaptive — the colors of the points in the tests are not fixed beforehand and the jury program can select them arbitrarily, in particular, depending on your program output. The first line of the standard input stream contains an integer n ( 1 ≤ n ≤ 30 ) — the number of points your program should name. Then n times your program must print two integer coordinates x and y ( 0 ≤ x ≤ 10 9 , 0 ≤ y ≤ 10 9 ). All points you print must be distinct. In response to each coordinate pair your program will receive the string " black ", if the point is black, or " white ", if the point is white. When all n poin

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44307089 Gassa C Oct. 14, 2018, 11:15 a.m. OK D TESTS 73 46 0 1900
48415731 DKACVenus C Jan. 15, 2019, 10:18 a.m. OK GNU C++11 TESTS 73 30 0 1900
48306754 TosakaUCW C Jan. 12, 2019, 8:24 p.m. OK GNU C++11 TESTS 73 30 0 1900
45191190 tjpuxgg C Nov. 2, 2018, 2:23 a.m. OK GNU C++11 TESTS 73 30 0 1900
44476373 jvjhfhg C Oct. 18, 2018, 9:11 a.m. OK GNU C++11 TESTS 73 30 0 1900
69546140 geneanlyz C Jan. 26, 2020, 2:53 a.m. OK GNU C++11 TESTS 73 31 0 1900
69500377 prayerhgq C Jan. 25, 2020, 6:20 a.m. OK GNU C++11 TESTS 73 31 0 1900
66581389 hsk142857 C Dec. 10, 2019, 9:32 a.m. OK GNU C++11 TESTS 73 31 0 1900
65466102 nerve_ending C Nov. 21, 2019, 6 a.m. OK GNU C++11 TESTS 73 31 0 1900
65465715 nerve_ending C Nov. 21, 2019, 5:45 a.m. OK GNU C++11 TESTS 73 31 0 1900
60587858 vjudge3 C Sept. 14, 2019, 10:54 p.m. OK GNU C++11 TESTS 73 31 0 1900
60586595 rude_dude C Sept. 14, 2019, 9:44 p.m. OK GNU C++14 TESTS 73 30 0 1900
45694305 1470519347 C Nov. 14, 2018, 12:47 a.m. OK GNU C++14 TESTS 73 30 0 1900
44338642 Stone. C Oct. 15, 2018, 12:45 a.m. OK GNU C++14 TESTS 73 30 0 1900
44317975 thelonesailor C Oct. 14, 2018, 1:23 p.m. OK GNU C++14 TESTS 73 30 0 1900
69397997 MrGary C Jan. 23, 2020, 7:13 a.m. OK GNU C++14 TESTS 73 31 0 1900
67978182 pseudocoder10 C Dec. 30, 2019, 5:54 p.m. OK GNU C++14 TESTS 73 31 0 1900
67632281 Sturdy C Dec. 26, 2019, 4:50 a.m. OK GNU C++14 TESTS 73 31 0 1900
66463972 tzaph_ C Dec. 7, 2019, 3:51 p.m. OK GNU C++14 TESTS 73 31 0 1900
64097789 turmax C Nov. 2, 2019, 2:27 p.m. OK GNU C++14 TESTS 73 31 0 1900
63797508 _DYT C Oct. 30, 2019, 1:10 p.m. OK GNU C++14 TESTS 73 31 0 1900
44327066 vntshh C Oct. 14, 2018, 4:32 p.m. OK GNU C++17 TESTS 73 30 307200 1900
68895763 mahdi.hasnat C Jan. 16, 2020, 4:23 a.m. OK GNU C++17 TESTS 73 31 0 1900
68644341 satashun C Jan. 12, 2020, 8:33 a.m. OK GNU C++17 TESTS 73 31 0 1900
68492052 seleznev_dima C Jan. 10, 2020, 12:04 p.m. OK GNU C++17 TESTS 73 31 0 1900
67608749 Atreus C Dec. 25, 2019, 2:33 p.m. OK GNU C++17 TESTS 73 31 0 1900
64842917 flashmt C Nov. 13, 2019, 4:48 p.m. OK GNU C++17 TESTS 73 31 0 1900
63697661 fdironia C Oct. 29, 2019, 6:07 a.m. OK GNU C++17 TESTS 73 31 0 1900
63697543 fdironia C Oct. 29, 2019, 6:05 a.m. OK GNU C++17 TESTS 73 31 0 1900
60653846 kempusss C Sept. 15, 2019, 9:06 p.m. OK GNU C++17 TESTS 73 31 0 1900
60588364 vjudge4 C Sept. 14, 2019, 11:29 p.m. OK GNU C++17 TESTS 73 31 0 1900
44336932 xodiac C Oct. 14, 2018, 10:36 p.m. OK Java 8 TESTS 73 109 0 1900
68217660 Harpae C Jan. 5, 2020, 1:42 a.m. OK Java 8 TESTS 73 124 0 1900
49844923 Ahmad_Elsagheer C Feb. 12, 2019, 8:47 p.m. OK Java 8 TESTS 73 124 0 1900
49554008 mikkk C Feb. 7, 2019, 8:22 a.m. OK Java 8 TESTS 73 124 0 1900
47863082 ViciousCoder C Jan. 3, 2019, 7:43 a.m. OK Java 8 TESTS 73 124 0 1900
44417602 _whatever C Oct. 16, 2018, 7:57 p.m. OK Java 8 TESTS 73 124 0 1900
44361438 alexander89116 C Oct. 15, 2018, 2:44 p.m. OK Java 8 TESTS 73 124 0 1900
44336973 xodiac C Oct. 14, 2018, 10:39 p.m. OK Java 8 TESTS 73 124 0 1900
44334690 PrakharJain C Oct. 14, 2018, 8:31 p.m. OK Java 8 TESTS 73 124 0 1900
44330160 wflms20110333 C Oct. 14, 2018, 5:58 p.m. OK Java 8 TESTS 73 124 0 1900
47545384 vjudge1 C Dec. 27, 2018, 9:48 a.m. OK MS C++ TESTS 73 31 0 1900
44304992 math957963 C Oct. 14, 2018, 11:03 a.m. OK MS C++ TESTS 73 46 0 1900
55091443 h.mokdad C June 4, 2019, 2:43 p.m. OK MS C++ 2017 TESTS 73 31 0 1900
50087573 jhoowy C Feb. 18, 2019, 8:25 a.m. OK MS C++ 2017 TESTS 73 31 0 1900
44303835 xh286286 C Oct. 14, 2018, 10:56 a.m. OK PyPy 3 TESTS 73 202 409600 1900
46264241 WNG C Nov. 26, 2018, 11:59 p.m. OK Python 2 TESTS 73 171 0 1900
44566788 ReaLNero C Oct. 20, 2018, 1:11 a.m. OK Python 2 TESTS 73 171 0 1900
44536635 test616.cpp C Oct. 19, 2018, 9:14 a.m. OK Python 2 TESTS 73 187 0 1900
46773347 lekha617 C Dec. 8, 2018, 6:22 p.m. OK Python 3 TESTS 73 124 0 1900
45228752 hjjhjj20020804hjjhjj C Nov. 3, 2018, 5:35 a.m. OK Python 3 TESTS 73 124 0 1900
44475593 JSZX11556 C Oct. 18, 2018, 8:46 a.m. OK Python 3 TESTS 73 124 0 1900
44475576 vjudge2 C Oct. 18, 2018, 8:46 a.m. OK Python 3 TESTS 73 124 0 1900
44324564 cszxdls C Oct. 14, 2018, 3:28 p.m. OK Python 3 TESTS 73 124 0 1900
44362485 sasuke4981 C Oct. 15, 2018, 3:11 p.m. OK Python 3 TESTS 73 139 0 1900
44323618 kimiyuki C Oct. 14, 2018, 3:05 p.m. OK Python 3 TESTS 73 140 0 1900

remove filters

Back to search problems