Codeforces Round 415 (Div. 1)

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
809 Codeforces Round 415 (Div. 1) FINISHED False 7200 281188485 May 20, 2017, 6:05 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1772 ) B Glad to see you! PROGRAMMING binary search interactive 2200

This is an interactive problem. In the output section below you will see the information about flushing the output. On Sunday Leha the hacker took Nura from the house where she lives and went with her to one of the most luxurious restaurants in Vičkopolis. Upon arrival, they left the car in a huge parking lot near the restaurant and hurried inside the building. In the restaurant a polite waiter immediately brought the menu to Leha and Noora, consisting of n dishes. It is interesting that all dishes in the menu are numbered with integers from 1 to n . After a little thought, the girl ordered exactly k different dishes from available in the menu. To pass the waiting time while the chefs prepare ordered dishes, the girl invited the hacker to play a game that will help them get to know each other better. The game itself is very simple: Noora wants Leha to guess any two dishes among all ordered. At the same time, she is ready to answer only one type of questions. Leha can say two numbers x and y (1 ≤ x , y ≤ n ) . After that Noora chooses some dish a for the number x such that, at first, a is among the dishes Noora ordered ( x can be equal to a ), and, secondly, the value is the minimum possible. By the same rules the girl chooses dish b for y . After that Noora says « TAK » to Leha, if , and « NIE » otherwise. However, the restaurant is preparing quickly, so Leha has enough time to ask no more than 60 questions. After that he should name numbers of any two dishes Noora ordered. Help Leha to solve this problem! There are two numbers n and k (2 ≤ k ≤ n ≤ 10 5 ) in the single line of input denoting the number of dishes in the menu and the number of dishes Noora ordered. If you want to provide an answer, output a string of the form 2 x y (1 ≤ x , y ≤ n , x ≠ y ) , if you think the dishes x and y was among dishes ordered by Noora. After that, flush the output and terminate your program. While helping Leha, you can ask queries to Noora no more than 60 times. Each qu

Tutorials

52099

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
28129181 fluffyowl B June 29, 2017, 1:30 a.m. OK D TESTS 92 31 2969600 2200
32135021 tianlongtc B Nov. 8, 2017, 7:52 a.m. OK GNU C++ TESTS 92 15 0 2200
30806635 Always B Sept. 28, 2017, 1:48 p.m. OK GNU C++ TESTS 92 15 0 2200
29819106 vjudge5 B Aug. 27, 2017, 5:09 a.m. OK GNU C++ TESTS 92 15 0 2200
29818972 vjudge1 B Aug. 27, 2017, 4:54 a.m. OK GNU C++ TESTS 92 15 0 2200
27823125 kczno1 B June 16, 2017, 11 a.m. OK GNU C++ TESTS 92 15 0 2200
27746866 RedTea B June 13, 2017, 1:31 a.m. OK GNU C++ TESTS 92 15 0 2200
27686332 2bb2b2bb2 B June 9, 2017, 9:41 a.m. OK GNU C++ TESTS 92 15 0 2200
32235062 vjudge4 B Nov. 12, 2017, 5:22 a.m. OK GNU C++ TESTS 92 15 0 2200
27628256 HIR180 B June 7, 2017, 8:10 a.m. OK GNU C++ TESTS 92 15 0 2200
32235085 vjudge5 B Nov. 12, 2017, 5:24 a.m. OK GNU C++ TESTS 92 15 0 2200
59535670 rainboy B Aug. 26, 2019, 4:49 p.m. OK GNU C11 TESTS 92 31 0 2200
30565472 Jayzhang B Sept. 21, 2017, 1:57 a.m. OK GNU C++11 TESTS 92 15 0 2200
29720624 cheater2k B Aug. 24, 2017, 2:27 a.m. OK GNU C++11 TESTS 92 15 0 2200
29681875 perchema B Aug. 22, 2017, noon OK GNU C++11 TESTS 92 15 0 2200
29537634 ctlchild B Aug. 17, 2017, 9:46 p.m. OK GNU C++11 TESTS 92 15 0 2200
27839088 cenhao B June 17, 2017, 6:25 a.m. OK GNU C++11 TESTS 92 15 0 2200
27680516 lichang B June 9, 2017, 12:52 a.m. OK GNU C++11 TESTS 92 15 0 2200
27676796 XJT B June 8, 2017, 6:05 p.m. OK GNU C++11 TESTS 92 15 0 2200
31232511 suchir B Oct. 12, 2017, 5:21 a.m. OK GNU C++11 TESTS 92 15 0 2200
30610166 zhaimingshuzms B Sept. 22, 2017, 9:13 a.m. OK GNU C++11 TESTS 92 15 0 2200
30659009 georgerapeanu B Sept. 24, 2017, 7:25 a.m. OK GNU C++11 TESTS 92 15 0 2200
27624646 Emiso B June 7, 2017, 3:46 a.m. OK GNU C++14 TESTS 92 15 0 2200
32344470 pr3pony B Nov. 16, 2017, 2:01 a.m. OK GNU C++14 TESTS 92 15 0 2200
30931720 Big_black_jujube B Oct. 2, 2017, 2:43 a.m. OK GNU C++14 TESTS 92 15 0 2200
30299976 RUSH_D_CAT B Sept. 13, 2017, 6:05 a.m. OK GNU C++14 TESTS 92 15 0 2200
29921218 abeker B Aug. 30, 2017, 2:23 p.m. OK GNU C++14 TESTS 92 15 0 2200
29640148 LEOLEI B Aug. 21, 2017, 9:34 a.m. OK GNU C++14 TESTS 92 15 0 2200
29516524 lanven B Aug. 17, 2017, 2:32 a.m. OK GNU C++14 TESTS 92 15 0 2200
29507263 lanven B Aug. 16, 2017, 2:03 p.m. OK GNU C++14 TESTS 92 15 0 2200
27704481 MAHTbl B June 10, 2017, 10:42 a.m. OK GNU C++14 TESTS 92 15 0 2200
27631558 I_Love_Umirzhanova_Amina B June 7, 2017, 11:34 a.m. OK GNU C++14 TESTS 92 15 0 2200
51469726 Mohammad_Yasser B March 19, 2019, 5:34 a.m. OK GNU C++17 TESTS 92 31 0 2200
64702291 AIBEK B Nov. 11, 2019, 3:14 p.m. OK GNU C++17 TESTS 92 31 0 2200
60264391 Nakagawa.Kanon B Sept. 8, 2019, 12:53 p.m. OK GNU C++17 TESTS 92 31 0 2200
59916938 Phortox B Sept. 2, 2019, 7:42 p.m. OK GNU C++17 TESTS 92 31 0 2200
55146508 hjk1030 B June 5, 2019, 3:15 p.m. OK GNU C++17 TESTS 92 31 0 2200
54829831 svince B May 30, 2019, 8:24 a.m. OK GNU C++17 TESTS 92 31 0 2200
53086868 veerappan B April 21, 2019, 9:20 a.m. OK GNU C++17 TESTS 92 31 0 2200
51423672 antontrygubO_o B March 17, 2019, 5:57 p.m. OK GNU C++17 TESTS 92 31 0 2200
47793873 arjun_9426 B Dec. 31, 2018, 3:17 p.m. OK GNU C++17 TESTS 92 31 0 2200
47532386 fakhoury B Dec. 26, 2018, 8:21 p.m. OK GNU C++17 TESTS 92 31 0 2200
27253955 Martynas B May 20, 2017, 9:28 p.m. OK Go TESTS 92 31 0 2200
27327265 lydxlx B May 24, 2017, 11:56 p.m. OK Java 8 TESTS 92 109 0 2200
27247851 shavkat B May 20, 2017, 7:14 p.m. OK Java 8 TESTS 92 109 0 2200
27543804 arauf B June 3, 2017, 12:22 p.m. OK Java 8 TESTS 92 124 0 2200
27295872 Bruteforceman B May 23, 2017, 7:12 a.m. OK Java 8 TESTS 92 124 0 2200
27999758 AndreiNet B June 24, 2017, 7:36 a.m. OK Java 8 TESTS 92 124 20582400 2200
27250466 poikniok B May 20, 2017, 7:42 p.m. OK Java 8 TESTS 92 139 0 2200
59791007 Joker_2018 B Aug. 31, 2019, 7:09 a.m. OK Java 8 TESTS 92 140 0 2200
32229405 bovinophile B Nov. 11, 2017, 7:42 p.m. OK Java 8 TESTS 92 140 0 2200
27326540 lydxlx B May 24, 2017, 9:33 p.m. OK Java 8 TESTS 92 140 0 2200
27326505 lydxlx B May 24, 2017, 9:29 p.m. OK Java 8 TESTS 92 140 0 2200
27358607 Alex7 B May 26, 2017, 3:12 p.m. OK MS C++ TESTS 92 15 0 2200
27273454 RCG B May 21, 2017, 8:29 p.m. OK MS C++ TESTS 92 15 0 2200
27249572 Vedensky B May 20, 2017, 7:33 p.m. OK MS C++ TESTS 92 15 102400 2200
30381555 ALWAYSWANNAFLY B Sept. 16, 2017, 11:04 a.m. OK MS C++ TESTS 92 15 204800 2200
27249635 Khazhak B May 20, 2017, 7:33 p.m. OK MS C++ TESTS 92 15 204800 2200
27267713 Filyan B May 21, 2017, 1:09 p.m. OK MS C++ TESTS 92 30 102400 2200
27451605 Godfella B May 30, 2017, 3:55 p.m. OK MS C++ TESTS 92 30 204800 2200
42996097 vjudge5 B Sept. 17, 2018, 12:06 p.m. OK MS C++ TESTS 92 31 0 2200
27247820 robinyu B May 20, 2017, 7:13 p.m. OK MS C++ TESTS 92 31 102400 2200
27566998 ze177482 B June 4, 2017, 3:45 p.m. OK MS C++ TESTS 92 31 204800 2200
53302835 BessieTheCow B April 25, 2019, 10:36 p.m. OK MS C++ 2017 TESTS 92 46 0 2200
61298473 pajenegod B Sept. 26, 2019, 3:20 a.m. OK PyPy 2 TESTS 92 155 0 2200
27258859 Vosatorp B May 21, 2017, 5:07 a.m. OK PyPy 3 TESTS 92 109 0 2200
28017058 Heisenbug B June 25, 2017, 6:40 a.m. OK Python 2 TESTS 92 61 4710400 2200
27261866 nwi B May 21, 2017, 7:47 a.m. OK Python 2 TESTS 92 62 0 2200
27790219 J_X B June 15, 2017, 9:12 a.m. OK Python 2 TESTS 92 77 0 2200
27269616 chemthan B May 21, 2017, 3:09 p.m. OK Python 3 TESTS 92 62 0 2200
34521137 waterside B Jan. 24, 2018, 3:16 p.m. OK Python 3 TESTS 92 77 5632000 2200
28095617 Stardust_Crusader B June 27, 2017, 4:18 p.m. OK Python 3 TESTS 92 78 5529600 2200
42257877 Doomsday_Singer B Aug. 29, 2018, 11:58 p.m. OK Python 3 TESTS 92 124 0 2200
42131088 Mk_Python_v1 B Aug. 26, 2018, 6:39 p.m. OK Python 3 TESTS 92 156 0 2200

remove filters

Back to search problems