Codeforces Round 864 (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
1797 Codeforces Round 864 (Div. 2) FINISHED False 7200 56303663 April 8, 2023, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7930 ) C Li Hua and Chess PROGRAMMING brute force constructive algorithms greedy hashing interactive

B'This is an interactive problem. Li Ming and Li Hua are playing a game. Li Hua has a chessboard of size n x m . Denote (r, c) ( 1 <= r <= n, 1 <= c <= m ) as the cell on the r -th row from the top and on the c -th column from the left. Li Ming put a king on the chessboard and Li Hua needs to guess its position. Li Hua can ask Li Ming no more than 3 questions. In each question, he can choose a cell and ask the minimum steps needed to move the king to the chosen cell. Each question is independent, which means the king doesn 't actually move. A king can move from (x,y) to (x ',y ') if and only if max {|x-x '|,|y-y '| }=1 (shown in the following picture). The position of the king is chosen before the interaction. Suppose you were Li Hua, please solve this problem. The first line contains the number of test cases t ( 1 <= t <= 10^3 ). The first line of each test case contains two integers n,m ( 1 <= n,m <= 10^9 ) -- the size of the chessboard, and then the interaction begins. To ask a question, print "? r c " (without quotes, 1 <= q r <= q n, 1 <= q c <= q m ). Then you should input the response from standard input -- the minimum steps the king needs to move to the chosen cell. If your program has asked an invalid question or has run out of questions, the interactor will terminate immediately and your program will get a verdict Wrong answer. To give the final answer, print "! r c " (without the quotes, (r,c) is the king 's initial coordinate). Note that giving this answer is not counted towards the limit of 3 questions. After asking a question do not forget to output the end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use: Hacks To hack, use the following format. The first line should contain a single integer t ( 1 <= t <= 10^3 ). The first and only line of each test case should contain four '...

Tutorials

Codeforces Round 864 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
201361921 DmitriyAnikeyev C April 8, 2023, 5:42 p.m. OK C# 10 TESTS 36 155 1433600
201401638 1435730 C April 9, 2023, 1 a.m. OK GNU C11 TESTS 36 93 0
201414753 vdeva003 C April 9, 2023, 4:28 a.m. OK GNU C++14 TESTS 36 46 0
201412884 zhujio C April 9, 2023, 4:01 a.m. OK GNU C++14 TESTS 36 46 0
201409372 zhenghanyun C April 9, 2023, 3:08 a.m. OK GNU C++14 TESTS 36 46 0
201417561 eds1 C April 9, 2023, 5:05 a.m. OK GNU C++14 TESTS 36 46 0
201408409 Tanishq_21 C April 9, 2023, 2:53 a.m. OK GNU C++14 TESTS 36 46 0
201402948 WUTONGHUA02 C April 9, 2023, 1:24 a.m. OK GNU C++14 TESTS 36 46 0
201402601 Fourier_WJY C April 9, 2023, 1:18 a.m. OK GNU C++14 TESTS 36 46 0
201385954 ETK. C April 8, 2023, 8:54 p.m. OK GNU C++14 TESTS 36 46 0
201415087 harryb17 C April 9, 2023, 4:33 a.m. OK GNU C++14 TESTS 36 46 0
201414992 DogSeven C April 9, 2023, 4:31 a.m. OK GNU C++14 TESTS 36 46 0
201422443 Mudit_Loya C April 9, 2023, 5:54 a.m. OK GNU C++17 TESTS 36 46 0
201421513 lalit_mohanani C April 9, 2023, 5:45 a.m. OK GNU C++17 TESTS 36 46 0
201421195 Nobita_ C April 9, 2023, 5:42 a.m. OK GNU C++17 TESTS 36 46 0
201421145 Coastal_crusin_28 C April 9, 2023, 5:42 a.m. OK GNU C++17 TESTS 36 46 0
201420873 Hritik12 C April 9, 2023, 5:40 a.m. OK GNU C++17 TESTS 36 46 0
201420300 Chetan_Jani C April 9, 2023, 5:34 a.m. OK GNU C++17 TESTS 36 46 0
201419090 codeAlxx C April 9, 2023, 5:21 a.m. OK GNU C++17 TESTS 36 46 0
201419040 codeAlxx C April 9, 2023, 5:20 a.m. OK GNU C++17 TESTS 36 46 0
201418882 codeAlxx C April 9, 2023, 5:19 a.m. OK GNU C++17 TESTS 36 46 0
201423213 sarauser C April 9, 2023, 6:01 a.m. OK GNU C++17 TESTS 36 46 0
201355096 logic_overfl0w C April 8, 2023, 5 p.m. OK GNU C++17 (64) TESTS 36 46 0
201414361 abhishekkumar20 C April 9, 2023, 4:23 a.m. OK GNU C++17 (64) TESTS 36 46 0
201402093 Rania C April 9, 2023, 1:09 a.m. OK GNU C++17 (64) TESTS 36 46 0
201382009 GILGAMESH C April 8, 2023, 8:20 p.m. OK GNU C++17 (64) TESTS 36 46 0
201371465 enslaved C April 8, 2023, 6:56 p.m. OK GNU C++17 (64) TESTS 36 46 0
201361230 RohitKotha10 C April 8, 2023, 5:37 p.m. OK GNU C++17 (64) TESTS 36 46 0
201358287 Lenlynn C April 8, 2023, 5:18 p.m. OK GNU C++17 (64) TESTS 36 46 0
201355058 pie_INDIA C April 8, 2023, 5 p.m. OK GNU C++17 (64) TESTS 36 46 0
201352929 eiqkx C April 8, 2023, 4:49 p.m. OK GNU C++17 (64) TESTS 36 46 0
201407324 vegetable_zajasi C April 9, 2023, 2:36 a.m. OK GNU C++17 (64) TESTS 36 61 0
201422393 ___berlin___ C April 9, 2023, 5:53 a.m. OK GNU C++20 (64) TESTS 36 46 0
201421402 ppafo C April 9, 2023, 5:44 a.m. OK GNU C++20 (64) TESTS 36 46 0
201415913 _Luffy_005 C April 9, 2023, 4:45 a.m. OK GNU C++20 (64) TESTS 36 46 0
201415207 tahm_id C April 9, 2023, 4:34 a.m. OK GNU C++20 (64) TESTS 36 46 0
201412918 void_3 C April 9, 2023, 4:02 a.m. OK GNU C++20 (64) TESTS 36 46 0
201412287 codebyrd C April 9, 2023, 3:52 a.m. OK GNU C++20 (64) TESTS 36 46 0
201412161 unknownnnn001 C April 9, 2023, 3:50 a.m. OK GNU C++20 (64) TESTS 36 46 0
201411502 roshanVerma C April 9, 2023, 3:41 a.m. OK GNU C++20 (64) TESTS 36 46 0
201409002 souravpust C April 9, 2023, 3:03 a.m. OK GNU C++20 (64) TESTS 36 46 0
201422795 AnasMaged C April 9, 2023, 5:57 a.m. OK GNU C++20 (64) TESTS 36 46 0
201401781 harsh.awasthi C April 9, 2023, 1:03 a.m. OK Go TESTS 36 93 204800
201356183 samitdas03 C April 8, 2023, 5:06 p.m. OK Java 11 TESTS 36 389 0
201404892 Tim2004 C April 9, 2023, 1:57 a.m. OK Java 11 TESTS 36 420 0
201353243 leoncn C April 8, 2023, 4:51 p.m. OK Java 11 TESTS 36 436 0
201390306 deepakanto C April 8, 2023, 9:37 p.m. OK Java 11 TESTS 36 436 0
201420340 SkadiTheCorruptHeart C April 9, 2023, 5:34 a.m. OK Java 11 TESTS 36 452 0
201371299 creativegiant C April 8, 2023, 6:55 p.m. OK Java 11 TESTS 36 452 0
201369361 BabyBlue0514 C April 8, 2023, 6:39 p.m. OK Java 11 TESTS 36 467 0
201382200 codingIsFun1234 C April 8, 2023, 8:22 p.m. OK Java 11 TESTS 36 482 0
201401488 SmartCode C April 9, 2023, 12:57 a.m. OK Java 11 TESTS 36 483 409600
201394457 WhatAGod C April 8, 2023, 10:34 p.m. OK Java 11 TESTS 36 498 204800
201420810 sid234890 C April 9, 2023, 5:39 a.m. OK Java 17 TESTS 36 358 921600
201361532 TCchen C April 8, 2023, 5:39 p.m. OK Java 17 TESTS 36 389 716800
201354981 MrOtter C April 8, 2023, 4:59 p.m. OK Java 17 TESTS 36 389 819200
201393012 1isGreaterThan0 C April 8, 2023, 10:11 p.m. OK Java 17 TESTS 36 421 921600
201360298 ahmedtawfik C April 8, 2023, 5:31 p.m. OK Java 17 TESTS 36 436 41164800
201352402 RohanC C April 8, 2023, 4:47 p.m. OK Java 17 TESTS 36 452 716800
201411022 Danger_Don C April 9, 2023, 3:33 a.m. OK Java 17 TESTS 36 498 1126400
201381703 mohamedhassan_c C April 8, 2023, 8:17 p.m. OK Java 8 TESTS 36 265 5939200
201366036 ND_ C April 8, 2023, 6:12 p.m. OK Java 8 TESTS 36 280 0
201422619 Hackit2002 C April 9, 2023, 5:56 a.m. OK Java 8 TESTS 36 296 0
201401500 vidwansAD C April 9, 2023, 12:57 a.m. OK Java 8 TESTS 36 296 0
201398039 yadavDipesh C April 8, 2023, 11:42 p.m. OK Java 8 TESTS 36 326 0
201367269 adesh123 C April 8, 2023, 6:21 p.m. OK MS C++ 2017 TESTS 36 77 0
201351925 kirill146 C April 8, 2023, 4:45 p.m. OK MS C++ 2017 TESTS 36 93 3993600
201375749 swseverance C April 8, 2023, 7:28 p.m. OK Node.js TESTS 36 436 4300800
201372868 swseverance C April 8, 2023, 7:07 p.m. OK Node.js TESTS 36 436 5632000
201369328 jonathan-chen10 C April 8, 2023, 6:39 p.m. OK Node.js TESTS 36 436 6451200
201413494 2momo2 C April 9, 2023, 4:10 a.m. OK PyPy 3 TESTS 36 327 3072000
201362382 rajeshpenugonda C April 8, 2023, 5:45 p.m. OK PyPy 3 TESTS 36 358 9420800
201369526 LazyRGuy C April 8, 2023, 6:40 p.m. OK PyPy 3 TESTS 36 405 6553600
201393923 Remineva C April 8, 2023, 10:26 p.m. OK PyPy 3-64 TESTS 36 249 4915200
201357209 poornaTheja C April 8, 2023, 5:12 p.m. OK PyPy 3-64 TESTS 36 249 5120000
201413507 Mohamed_Hamed C April 9, 2023, 4:10 a.m. OK PyPy 3-64 TESTS 36 264 3788800
201422510 Vishnu_Actual C April 9, 2023, 5:55 a.m. OK PyPy 3-64 TESTS 36 264 5427200
201381175 CherryCocoa C April 8, 2023, 8:13 p.m. OK PyPy 3-64 TESTS 36 264 5836800
201358356 VectorASD C April 8, 2023, 5:19 p.m. OK PyPy 3-64 TESTS 36 264 6451200
201409948 rishab_agrawal C April 9, 2023, 3:17 a.m. OK PyPy 3-64 TESTS 36 264 9523200
201365125 Kartik_Singh C April 8, 2023, 6:04 p.m. OK PyPy 3-64 TESTS 36 264 9728000
201357348 Turtleeee C April 8, 2023, 5:13 p.m. OK PyPy 3-64 TESTS 36 265 9216000
201362691 flexr C April 8, 2023, 5:47 p.m. OK PyPy 3-64 TESTS 36 265 9523200
201360920 Ferrriccc C April 8, 2023, 5:35 p.m. OK Python 3 TESTS 36 155 307200
201369343 Great_Druk C April 8, 2023, 6:39 p.m. OK Python 3 TESTS 36 170 204800
201416092 Komali0214 C April 9, 2023, 4:47 a.m. OK Python 3 TESTS 36 171 204800
201379139 MohmadZaid._. C April 8, 2023, 7:56 p.m. OK Python 3 TESTS 36 171 204800
201364027 RULO C April 8, 2023, 5:56 p.m. OK Python 3 TESTS 36 171 204800
201396919 juanbueno00k C April 8, 2023, 11:20 p.m. OK Python 3 TESTS 36 186 1024000
201378896 MohmadZaid._. C April 8, 2023, 7:54 p.m. OK Python 3 TESTS 36 187 204800
201367611 Ykd C April 8, 2023, 6:24 p.m. OK Python 3 TESTS 36 187 204800
201389086 liut C April 8, 2023, 9:24 p.m. OK Rust 2021 TESTS 36 93 0
201409065 manchik C April 9, 2023, 3:04 a.m. OK Rust 2021 TESTS 36 108 0

remove filters

Back to search problems