Codeforces Round 865 (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
1816 Codeforces Round 865 (Div. 2) FINISHED False 8100 56214863 April 9, 2023, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17788 ) A Ian Visits Mary PROGRAMMING constructive algorithms geometry 800

B"Ian and Mary are frogs living on lattice points of the Cartesian coordinate plane, with Ian living on (0,0) and Mary living on (a,b) . Ian would like to visit Mary by jumping around the Cartesian coordinate plane. Every second, he jumps from his current position (x_p, y_p) to another lattice point (x_q, y_q) , such that no lattice point other than (x_p, y_p) and (x_q, y_q) lies on the segment between point (x_p, y_p) and point (x_q, y_q) . As Ian wants to meet Mary as soon as possible, he wants to jump towards point (a,b) using at most 2 jumps. Unfortunately, Ian is not good at maths. Can you help him? A lattice point is defined as a point with both the x -coordinate and y -coordinate being integers. The first line contains a single integer t ( 1 <= t <= 500 ) -- the number of test cases. The description of test cases follows. The first and only line of each test case contains two integers a and b ( 1 <= a,b <= 10^9 ) -- the coordinates of the lattice point where Mary lives. For each test case, print an integer n ( 1 <= n <= 2 ) on the first line, denoting the number of jumps Ian uses in order to meet Mary. Note that you do not need to minimize the number of jumps. On the i -th line of the next n lines, print two integers 0 <= x_i,y_i <= 10^9 separated by a space, denoting Ian's location (x_i,y_i) after the i -th jump. x_n = a , y_n = b must hold. Ian's initial location and his locations after each of the n jumps need not be distinct. If there are multiple solutions, output any. In the first test case: (0,0) to (3,4) In the second test case: (0,0) to (3,2) to (4,4) In the third test case: (0,0) to (5,3) to (3,6) "...

Tutorials

Editorial of Codeforces Round #865

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
201576752 alsomalo A April 9, 2023, 6:58 p.m. OK C# 10 TESTS 16 62 3788800 800
201572429 Bin_Saff A April 9, 2023, 6:19 p.m. OK GNU C11 TESTS 16 15 0 800
201560824 garg_prashant A April 9, 2023, 4:55 p.m. OK GNU C11 TESTS 16 15 0 800
201577238 astronom1cal A April 9, 2023, 7:03 p.m. OK GNU C11 TESTS 16 31 0 800
201591904 kaip A April 9, 2023, 9:53 p.m. OK GNU C11 TESTS 16 31 0 800
201594089 maruf_bro A April 9, 2023, 10:33 p.m. OK GNU C11 TESTS 16 31 0 800
201610408 ashh18 A April 10, 2023, 3:56 a.m. OK GNU C11 TESTS 16 31 0 800
201617146 katomasao A April 10, 2023, 5:36 a.m. OK GNU C11 TESTS 16 31 0 800
201573414 c0derro A April 9, 2023, 6:27 p.m. OK GNU C11 TESTS 16 31 0 800
201573571 Bin_Saff A April 9, 2023, 6:28 p.m. OK GNU C11 TESTS 16 31 0 800
201573096 _Scorpion A April 9, 2023, 6:24 p.m. OK GNU C++14 TESTS 16 0 0 800
201617435 LinkZelda1225 A April 10, 2023, 5:40 a.m. OK GNU C++14 TESTS 16 0 0 800
201614502 Halym2007 A April 10, 2023, 4:59 a.m. OK GNU C++14 TESTS 16 0 0 800
201610469 dhruv437 A April 10, 2023, 3:57 a.m. OK GNU C++14 TESTS 16 0 0 800
201601943 wiza_rd A April 10, 2023, 1:16 a.m. OK GNU C++14 TESTS 16 0 0 800
201594411 MiguelAngel A April 9, 2023, 10:39 p.m. OK GNU C++14 TESTS 16 0 0 800
201573349 underkill A April 9, 2023, 6:26 p.m. OK GNU C++14 TESTS 16 0 0 800
201570929 GradZ002 A April 9, 2023, 6:07 p.m. OK GNU C++14 TESTS 16 0 0 800
201569477 plastical A April 9, 2023, 5:56 p.m. OK GNU C++14 TESTS 16 0 0 800
201569093 Fuad37 A April 9, 2023, 5:54 p.m. OK GNU C++14 TESTS 16 0 0 800
201608502 Baiiche A April 10, 2023, 3:24 a.m. OK GNU C++17 TESTS 16 0 0 800
201610780 lulalalulalalulalulalei A April 10, 2023, 4:02 a.m. OK GNU C++17 TESTS 16 0 0 800
201578644 sabuli A April 9, 2023, 7:17 p.m. OK GNU C++17 TESTS 16 0 0 800
201612541 zhouleyi A April 10, 2023, 4:29 a.m. OK GNU C++17 TESTS 16 0 0 800
201613325 5835194088_KienNT A April 10, 2023, 4:42 a.m. OK GNU C++17 TESTS 16 0 0 800
201613972 Neodoomer A April 10, 2023, 4:52 a.m. OK GNU C++17 TESTS 16 0 0 800
201616314 Evadra_jiangly A April 10, 2023, 5:23 a.m. OK GNU C++17 TESTS 16 0 0 800
201616433 MH_Parag A April 10, 2023, 5:25 a.m. OK GNU C++17 TESTS 16 0 0 800
201607962 robotlab A April 10, 2023, 3:15 a.m. OK GNU C++17 TESTS 16 0 0 800
201617941 yohuang A April 10, 2023, 5:47 a.m. OK GNU C++17 TESTS 16 0 0 800
201583216 you_knowme A April 9, 2023, 8:06 p.m. OK GNU C++17 (64) TESTS 16 0 0 800
201568851 harshikeshbhadaniya A April 9, 2023, 5:52 p.m. OK GNU C++17 (64) TESTS 16 0 0 800
201568808 _oo1oo_ A April 9, 2023, 5:52 p.m. OK GNU C++17 (64) TESTS 16 0 0 800
201568358 Monir A April 9, 2023, 5:49 p.m. OK GNU C++17 (64) TESTS 16 0 0 800
201618342 jcccc A April 10, 2023, 5:52 a.m. OK GNU C++17 (64) TESTS 16 0 0 800
201612786 mouhua A April 10, 2023, 4:34 a.m. OK GNU C++17 (64) TESTS 16 0 0 800
201608240 ZzMK A April 10, 2023, 3:20 a.m. OK GNU C++17 (64) TESTS 16 0 0 800
201596644 Maram A April 9, 2023, 11:23 p.m. OK GNU C++17 (64) TESTS 16 0 0 800
201590607 tejava A April 9, 2023, 9:34 p.m. OK GNU C++17 (64) TESTS 16 0 0 800
201580525 letscodeit A April 9, 2023, 7:37 p.m. OK GNU C++17 (64) TESTS 16 0 0 800
201610700 Shuv0.00 A April 10, 2023, 4:01 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201617942 manik_2021336 A April 10, 2023, 5:47 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201617409 ayushk22 A April 10, 2023, 5:39 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201613452 aibark A April 10, 2023, 4:44 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201613224 FanWQ A April 10, 2023, 4:41 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201611783 rasil A April 10, 2023, 4:17 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201610861 agentdash123 A April 10, 2023, 4:04 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201610694 Ripiaun A April 10, 2023, 4 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201610620 smgr A April 10, 2023, 3:59 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201609520 Harshit_1502 A April 10, 2023, 3:41 a.m. OK GNU C++20 (64) TESTS 16 0 0 800
201608297 manchik A April 10, 2023, 3:21 a.m. OK Go TESTS 16 15 102400 800
201579052 codingIsFun1234 A April 9, 2023, 7:21 p.m. OK Java 11 TESTS 16 202 0 800
201574002 BabyBlue0514 A April 9, 2023, 6:32 p.m. OK Java 11 TESTS 16 217 0 800
201555872 hrushi A April 9, 2023, 4:42 p.m. OK Java 11 TESTS 16 233 0 800
201572967 FirstException A April 9, 2023, 6:23 p.m. OK Java 11 TESTS 16 233 41164800 800
201591658 kaip A April 9, 2023, 9:49 p.m. OK Java 11 TESTS 16 264 0 800
201578734 ilasiawo A April 9, 2023, 7:18 p.m. OK Java 11 TESTS 16 264 0 800
201580403 ETHANHUNTMI5 A April 9, 2023, 7:35 p.m. OK Java 11 TESTS 16 280 0 800
201557022 wat2 A April 9, 2023, 4:45 p.m. OK Java 11 TESTS 16 280 0 800
201617582 dhruv.p6 A April 10, 2023, 5:42 a.m. OK Java 17 TESTS 16 186 307200 800
201558600 jasonkaixie A April 9, 2023, 4:49 p.m. OK Java 17 TESTS 16 218 409600 800
201566229 SugoiTurtle A April 9, 2023, 5:39 p.m. OK Java 17 TESTS 16 233 614400 800
201612958 aishwarykesarwani A April 10, 2023, 4:37 a.m. OK Java 17 TESTS 16 233 716800 800
201574291 Abhishek1710 A April 9, 2023, 6:35 p.m. OK Java 17 TESTS 16 233 819200 800
201562006 jimmyd211 A April 9, 2023, 4:57 p.m. OK Java 17 TESTS 16 234 512000 800
201608630 Danger_Don A April 10, 2023, 3:26 a.m. OK Java 17 TESTS 16 248 614400 800
201607804 noobcoder696969 A April 10, 2023, 3:12 a.m. OK Java 17 TESTS 16 249 819200 800
201598232 safy97 A April 10, 2023, midnight OK Java 17 TESTS 16 249 921600 800
201574396 Abhishek1710 A April 9, 2023, 6:36 p.m. OK Java 17 TESTS 16 249 1024000 800
201595566 OmarRoka29 A April 9, 2023, 11:01 p.m. OK Java 8 TESTS 16 93 0 800
201618823 Kenzhezhan A April 10, 2023, 5:58 a.m. OK Java 8 TESTS 16 108 0 800
201589584 kaip A April 9, 2023, 9:20 p.m. OK Java 8 TESTS 16 109 0 800
201615035 vkukretiwork A April 10, 2023, 5:06 a.m. OK Java 8 TESTS 16 124 0 800
201603789 riyadas.200208 A April 10, 2023, 1:56 a.m. OK Java 8 TESTS 16 124 0 800
201573055 Parth_Pandey A April 9, 2023, 6:24 p.m. OK Java 8 TESTS 16 124 0 800
201617244 _Jiarui.X_ A April 10, 2023, 5:37 a.m. OK Java 8 TESTS 16 139 0 800
201572968 Juhaied_nabid A April 9, 2023, 6:23 p.m. OK Java 8 TESTS 16 139 0 800
201591845 kaip A April 9, 2023, 9:52 p.m. OK Java 8 TESTS 16 140 0 800
201608508 chuquwan9964 A April 10, 2023, 3:24 a.m. OK Java 8 TESTS 16 155 0 800
201609589 lasksafj A April 10, 2023, 3:43 a.m. OK MS C++ 2017 TESTS 16 15 0 800
201607515 cz1137 A April 10, 2023, 3:07 a.m. OK MS C++ 2017 TESTS 16 15 0 800
201572279 mukhaledd A April 9, 2023, 6:17 p.m. OK MS C++ 2017 TESTS 16 15 0 800
201618499 hermitL A April 10, 2023, 5:54 a.m. OK MS C++ 2017 TESTS 16 31 0 800
201591177 Sushi0077 A April 9, 2023, 9:42 p.m. OK MS C++ 2017 TESTS 16 31 0 800
201572618 EbuYandex A April 9, 2023, 6:20 p.m. OK MS C++ 2017 TESTS 16 31 0 800
201576048 Ysb04 A April 9, 2023, 6:51 p.m. OK PyPy 3 TESTS 16 108 2867200 800
201594113 sewa.bulgakov A April 9, 2023, 10:33 p.m. OK PyPy 3 TESTS 16 109 3174400 800
201603716 jinzew A April 10, 2023, 1:55 a.m. OK PyPy 3 TESTS 16 124 2560000 800
201608956 Rohan_IITD A April 10, 2023, 3:32 a.m. OK PyPy 3 TESTS 16 124 3481600 800
201569115 rohanmitra2420 A April 9, 2023, 5:54 p.m. OK PyPy 3 TESTS 16 139 3481600 800
201596731 viduz A April 9, 2023, 11:25 p.m. OK PyPy 3 TESTS 16 140 3686400 800
201566255 rajeshpenugonda A April 9, 2023, 5:39 p.m. OK PyPy 3 TESTS 16 171 8294400 800
201567464 brokie A April 9, 2023, 5:44 p.m. OK PyPy 3 TESTS 16 202 5632000 800
201587665 17x000 A April 9, 2023, 8:55 p.m. OK PyPy 3-64 TESTS 16 77 0 800
201571952 rmr A April 9, 2023, 6:15 p.m. OK PyPy 3-64 TESTS 16 77 3276800 800
201568938 isekun A April 9, 2023, 5:52 p.m. OK PyPy 3-64 TESTS 16 77 3993600 800
201584801 cybsbbb A April 9, 2023, 8:24 p.m. OK PyPy 3-64 TESTS 16 78 3788800 800
201616472 Yansou A April 10, 2023, 5:25 a.m. OK PyPy 3-64 TESTS 16 78 3993600 800
201593892 Mustela_Erminea A April 9, 2023, 10:29 p.m. OK PyPy 3-64 TESTS 16 78 4096000 800
201614390 voicon A April 10, 2023, 4:58 a.m. OK PyPy 3-64 TESTS 16 93 3584000 800
201562034 rosezeal A April 9, 2023, 4:57 p.m. OK PyPy 3-64 TESTS 16 93 3584000 800
201566105 krishna369 A April 9, 2023, 5:38 p.m. OK PyPy 3-64 TESTS 16 93 3686400 800
201586702 cybsbbb A April 9, 2023, 8:44 p.m. OK PyPy 3-64 TESTS 16 93 3788800 800
201579658 elistark A April 9, 2023, 7:27 p.m. OK Python 3 TESTS 16 31 0 800
201613605 coder3231 A April 10, 2023, 4:46 a.m. OK Python 3 TESTS 16 46 0 800
201613139 pennymagic156 A April 10, 2023, 4:39 a.m. OK Python 3 TESTS 16 46 0 800
201608963 akash20021118 A April 10, 2023, 3:32 a.m. OK Python 3 TESTS 16 46 0 800
201595261 PythonIsGodlike A April 9, 2023, 10:55 p.m. OK Python 3 TESTS 16 46 0 800
201593810 Akriti_2303 A April 9, 2023, 10:27 p.m. OK Python 3 TESTS 16 46 0 800
201592421 momenelmesady4803 A April 9, 2023, 10:02 p.m. OK Python 3 TESTS 16 46 0 800
201587299 MohmadZaid._. A April 9, 2023, 8:51 p.m. OK Python 3 TESTS 16 46 0 800
201587031 redthag A April 9, 2023, 8:48 p.m. OK Python 3 TESTS 16 46 0 800
201579019 RahulSinghIITD A April 9, 2023, 7:21 p.m. OK Python 3 TESTS 16 46 0 800
201610837 manchik A April 10, 2023, 4:03 a.m. OK Rust 2021 TESTS 16 15 0 800

remove filters

Back to search problems