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 |
---|---|---|---|---|---|---|
1007 | Codeforces Round 497 (Div. 1) | FINISHED | False | 7800 | 206033124 | July 13, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 420 ) | C | Guess two numbers | PROGRAMMING | binary search interactive | 2800 |
B"This is an interactive problem. Vasya and Vitya play a game. Vasya thought of two integers a and b from 1 to n and Vitya tries to guess them. Each round he tells Vasya two numbers x and y from 1 to n . If both x=a and y=b then Vitya wins. Else Vasya must say one of the three phrases: Vasya can't lie, but if multiple phrases are true, he may choose any of them. For example, if Vasya thought of numbers 2 and 4 , then he answers with the phrase 3 to a query (3, 4) , and he can answer with the phrase 1 or phrase 3 to a query (1, 5) . Help Vitya win in no more than 600 rounds. The first line contains a single integer n ( 1 <= q n <= q 10^{18} ) -- the upper limit of the numbers. First, you need to read the number n , after that you can make queries. To make a query, print two integers: x and y ( 1 <= q x, y <= q n ), then flush the output. After each query, read a single integer ans ( 0 <= q ans <= q 3 ). If ans > 0 , then it is the number of the phrase said by Vasya. If ans = 0 , it means that you win and your program should terminate. If you make more than 600 queries or make an incorrect query, you will get Wrong Answer. Your solution will get Idleness Limit Exceeded, if you don't print anything or forget to flush the output. To flush you need to do the following right after printing a query and a line end: Hacks format For hacks, use the following format: In the first line, print a single integer n ( 1 <= q n <= q 10^{18} ) -- the upper limit of the numbers. In the second line, print two integers a and b ( 1 <= q a, b <= q n ) -- the numbers which Vasya thought of. In the third line, print a single integer m ( 1 <= q m <= q 10^5 ) -- the number of instructions for the interactor. In each of the next m lines, print five integers: x_i , y_i$"... |
Editorial for Codeforces Round #497 by Skyglow |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
41906084 | haitian | C | Aug. 20, 2018, 2:41 p.m. | OK | GNU C++ | TESTS | 38 | 31 | 0 | 2800 | |
41309010 | Renaissanceharry | C | Aug. 7, 2018, 2:45 p.m. | OK | GNU C++ | TESTS | 38 | 31 | 0 | 2800 | |
40570409 | rzswh | C | July 20, 2018, 7:50 a.m. | OK | GNU C++ | TESTS | 38 | 31 | 0 | 2800 | |
40325607 | zhouyuyang | C | July 14, 2018, 2:47 p.m. | OK | GNU C++ | TESTS | 38 | 31 | 0 | 2800 | |
40321733 | zhouyuyang | C | July 14, 2018, 2:34 p.m. | OK | GNU C++ | TESTS | 38 | 31 | 0 | 2800 | |
41678722 | minhphuoc1998 | C | Aug. 17, 2018, 9:31 a.m. | OK | GNU C++ | TESTS | 38 | 46 | 0 | 2800 | |
41542389 | samjia2000 | C | Aug. 13, 2018, 1:22 a.m. | OK | GNU C++ | TESTS | 38 | 46 | 0 | 2800 | |
41542300 | samjia2000 | C | Aug. 13, 2018, 1:18 a.m. | OK | GNU C++ | TESTS | 38 | 46 | 0 | 2800 | |
40848629 | nblt | C | July 27, 2018, 1:24 p.m. | OK | GNU C++ | TESTS | 38 | 46 | 0 | 2800 | |
40476218 | vjudge1 | C | July 17, 2018, 11:58 a.m. | OK | GNU C++ | TESTS | 38 | 46 | 0 | 2800 | |
40912321 | tqyaaaaaaaang | C | July 29, 2018, 9:32 a.m. | OK | GNU C++11 | TESTS | 38 | 30 | 0 | 2800 | |
40469501 | s-quark | C | July 17, 2018, 8:22 a.m. | OK | GNU C++11 | TESTS | 38 | 30 | 0 | 2800 | |
68891127 | Scut82 | C | Jan. 16, 2020, 2:19 a.m. | OK | GNU C++11 | TESTS | 38 | 31 | 0 | 2800 | |
66587292 | luogu_bot5 | C | Dec. 10, 2019, 11:41 a.m. | OK | GNU C++11 | TESTS | 38 | 31 | 0 | 2800 | |
66587246 | MoQianXue | C | Dec. 10, 2019, 11:40 a.m. | OK | GNU C++11 | TESTS | 38 | 31 | 0 | 2800 | |
57869230 | lopare | C | July 28, 2019, 12:05 a.m. | OK | GNU C++11 | TESTS | 38 | 31 | 0 | 2800 | |
57430597 | wwdd | C | July 21, 2019, 12:55 a.m. | OK | GNU C++11 | TESTS | 38 | 31 | 0 | 2800 | |
47282607 | luogu_bot5 | C | Dec. 20, 2018, 3:06 a.m. | OK | GNU C++11 | TESTS | 38 | 31 | 0 | 2800 | |
47282602 | Clao_015 | C | Dec. 20, 2018, 3:05 a.m. | OK | GNU C++11 | TESTS | 38 | 31 | 0 | 2800 | |
47193746 | CrazyTeaMajor | C | Dec. 18, 2018, 1:33 p.m. | OK | GNU C++11 | TESTS | 38 | 31 | 0 | 2800 | |
40294341 | zeliboba | C | July 13, 2018, 7:17 p.m. | OK | GNU C++14 | TESTS | 38 | 30 | 0 | 2800 | |
67648764 | Scut82 | C | Dec. 26, 2019, 11:16 a.m. | OK | GNU C++14 | TESTS | 38 | 31 | 0 | 2800 | |
61343792 | AlphaWA | C | Sept. 27, 2019, 2:30 a.m. | OK | GNU C++14 | TESTS | 38 | 31 | 0 | 2800 | |
58162846 | Scut82 | C | Aug. 2, 2019, 8:02 a.m. | OK | GNU C++14 | TESTS | 38 | 31 | 0 | 2800 | |
58162046 | Scut82 | C | Aug. 2, 2019, 7:47 a.m. | OK | GNU C++14 | TESTS | 38 | 31 | 0 | 2800 | |
49989614 | nqiiii | C | Feb. 16, 2019, 12:10 p.m. | OK | GNU C++14 | TESTS | 38 | 31 | 0 | 2800 | |
44817892 | CodePlatina | C | Oct. 24, 2018, 10:53 p.m. | OK | GNU C++14 | TESTS | 38 | 31 | 0 | 2800 | |
44493353 | rapurasu | C | Oct. 18, 2018, 3:34 p.m. | OK | GNU C++14 | TESTS | 38 | 31 | 0 | 2800 | |
43368501 | Motarack | C | Sept. 24, 2018, 1:26 p.m. | OK | GNU C++14 | TESTS | 38 | 31 | 0 | 2800 | |
41952538 | lfw | C | Aug. 22, 2018, 3:02 a.m. | OK | GNU C++14 | TESTS | 38 | 31 | 0 | 2800 | |
69099574 | hjk1030 | C | Jan. 19, 2020, 1:25 p.m. | OK | GNU C++17 | TESTS | 38 | 31 | 0 | 2800 | |
41232134 | dinosaurs | C | Aug. 5, 2018, 4:12 a.m. | OK | GNU C++17 | TESTS | 38 | 31 | 0 | 2800 | |
40540907 | bktl1love | C | July 19, 2018, 8:35 a.m. | OK | GNU C++17 | TESTS | 38 | 31 | 0 | 2800 | |
40356670 | Hamzqq9 | C | July 14, 2018, 8:23 p.m. | OK | GNU C++17 | TESTS | 38 | 31 | 0 | 2800 | |
40295182 | Benq | C | July 13, 2018, 7:41 p.m. | OK | GNU C++17 | TESTS | 38 | 31 | 0 | 2800 | |
40292416 | zemen | C | July 13, 2018, 4:44 p.m. | OK | GNU C++17 | TESTS | 38 | 31 | 0 | 2800 | |
40290891 | Madball | C | July 13, 2018, 4:34 p.m. | OK | GNU C++17 | TESTS | 38 | 31 | 0 | 2800 | |
40290384 | harryoooooooooo | C | July 13, 2018, 4:31 p.m. | OK | GNU C++17 | TESTS | 38 | 31 | 0 | 2800 | |
40289014 | yosupo | C | July 13, 2018, 4:20 p.m. | OK | GNU C++17 | TESTS | 38 | 31 | 102400 | 2800 | |
52906768 | mayaohua2003 | C | April 17, 2019, 12:53 p.m. | OK | GNU C++17 | TESTS | 38 | 31 | 204800 | 2800 | |
40539671 | TheAmirCoder | C | July 19, 2018, 7:58 a.m. | OK | GNU C++17 Diagnostics | TESTS | 38 | 888 | 512000 | 2800 | |
56040117 | Scut82 | C | June 25, 2019, 1:55 p.m. | OK | Java 8 | TESTS | 38 | 155 | 0 | 2800 | |
68425926 | Scut82 | C | Jan. 9, 2020, 3:15 a.m. | OK | Java 8 | TESTS | 38 | 171 | 0 | 2800 | |
40308863 | wflms20110333 | C | July 14, 2018, 7:08 a.m. | OK | Java 8 | TESTS | 38 | 186 | 0 | 2800 | |
40718801 | eldarado | C | July 24, 2018, 10:14 p.m. | OK | Java 8 | TESTS | 38 | 218 | 0 | 2800 | |
40668608 | SrapZark | C | July 23, 2018, 11:23 a.m. | OK | Java 8 | TESTS | 38 | 327 | 0 | 2800 | |
40283492 | Egor | C | July 13, 2018, 3:41 p.m. | OK | Java 8 | TESTS | 38 | 343 | 0 | 2800 | |
40306632 | absi2011 | C | July 14, 2018, 6:07 a.m. | OK | MS C++ | TESTS | 38 | 31 | 0 | 2800 | |
40296322 | Ali_Pi | C | July 13, 2018, 8:27 p.m. | OK | Python 2 | TESTS | 38 | 202 | 0 | 2800 | |
40930643 | ReaLNero1 | C | July 30, 2018, 12:04 a.m. | OK | Python 3 | TESTS | 38 | 124 | 0 | 2800 | |
40375544 | _Kee | C | July 15, 2018, 10:48 a.m. | OK | Python 3 | TESTS | 38 | 202 | 614400 | 2800 | |
40348171 | johnchen902 | C | July 14, 2018, 4:32 p.m. | OK | Python 3 | TESTS | 38 | 217 | 819200 | 2800 | |
40296451 | AndreySergunin | C | July 13, 2018, 8:34 p.m. | OK | Python 3 | TESTS | 38 | 358 | 0 | 2800 | |
40712485 | cristian1997 | C | July 24, 2018, 4:56 p.m. | OK | Python 3 | TESTS | 38 | 421 | 0 | 2800 | |
40770035 | xh286286 | C | July 26, 2018, 8:09 a.m. | OK | Python 3 | TESTS | 38 | 436 | 512000 | 2800 | |
40521878 | xh286286 | C | July 18, 2018, 5:01 p.m. | OK | Python 3 | TESTS | 38 | 483 | 512000 | 2800 |
Back to search problems