Codeforces Global Round 17

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
1610 Codeforces Global Round 17 FINISHED False 10800 99588263 Nov. 23, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16299 ) A Anti Light's Cell Guessing PROGRAMMING constructive algorithms implementation math

B"You are playing a game on a n x m grid, in which the computer has selected some cell (x, y) of the grid, and you have to determine which one. To do so, you will choose some k and some k cells (x_1, y_1), , (x_2, y_2), ldots, (x_k, y_k) , and give them to the computer. In response, you will get k numbers b_1, , b_2, ldots b_k , where b_i is the manhattan distance from (x_i, y_i) to the hidden cell (x, y) (so you know which distance corresponds to which of k input cells). After receiving these b_1, , b_2, ldots, b_k , you have to be able to determine the hidden cell. What is the smallest k for which is it possible to always guess the hidden cell correctly, no matter what cell computer chooses? As a reminder, the manhattan distance between cells (a_1, b_1) and (a_2, b_2) is equal to |a_1-a_2|+|b_1-b_2| . The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of test cases follows. The single line of each test case contains two integers n and m ( 1 <= n, m <= 10^9 ) -- the number of rows and the number of columns in the grid. For each test case print a single integer -- the minimum k for that test case. In the first test case, the smallest such k is 2 , for which you can choose, for example, cells (1, 1) and (2, 1) . Note that you can't choose cells (1, 1) and (2, 3) for k = 2 , as both cells (1, 2) and (2, 1) would give b_1 = 1, b_2 = 2 , so we wouldn't be able to determine which cell is hidden if computer selects one of those. In the second test case, you should choose k = 1 , for it you can choose cell (3, 1) or (1, 1) . "...

Tutorials

Codeforces Global Round 17 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
136692846 gxlois A Nov. 23, 2021, 10:12 p.m. OK D TESTS 3 15 0
136661309 urvish_pujara A Nov. 23, 2021, 4:03 p.m. OK GNU C11 TESTS 3 31 0
136706428 SADIQ_insD A Nov. 24, 2021, 5:25 a.m. OK GNU C11 TESTS 3 31 0
136688263 MUMINUR_RASHID A Nov. 23, 2021, 7:54 p.m. OK GNU C11 TESTS 3 31 0
136688227 BLACK-HEAD A Nov. 23, 2021, 7:53 p.m. OK GNU C11 TESTS 3 31 0
136677260 yuyu_ A Nov. 23, 2021, 5:24 p.m. OK GNU C11 TESTS 3 31 102400
136675152 LittleNewb A Nov. 23, 2021, 5:11 p.m. OK GNU C11 TESTS 3 46 0
136698400 nabiurrahman2004 A Nov. 24, 2021, 2:21 a.m. OK GNU C11 TESTS 3 46 0
136695244 dianzikejidaxue A Nov. 24, 2021, 12:15 a.m. OK GNU C11 TESTS 3 46 0
136682028 G.Gopi_Krishna A Nov. 23, 2021, 6:08 p.m. OK GNU C11 TESTS 3 46 0
136676646 __TheKing A Nov. 23, 2021, 5:20 p.m. OK GNU C11 TESTS 3 46 0
136700366 amritraj430 A Nov. 24, 2021, 3:15 a.m. OK GNU C++14 TESTS 3 0 0
136708265 Achintyah77 A Nov. 24, 2021, 5:53 a.m. OK GNU C++14 TESTS 3 0 0
136707003 bluesquanium A Nov. 24, 2021, 5:34 a.m. OK GNU C++14 TESTS 3 0 0
136706634 Rio_321 A Nov. 24, 2021, 5:28 a.m. OK GNU C++14 TESTS 3 0 0
136706489 Eric_hooo A Nov. 24, 2021, 5:26 a.m. OK GNU C++14 TESTS 3 0 0
136705238 dhruv04 A Nov. 24, 2021, 5:04 a.m. OK GNU C++14 TESTS 3 0 0
136704177 ButterCake A Nov. 24, 2021, 4:43 a.m. OK GNU C++14 TESTS 3 0 0
136704122 gamingarpit532 A Nov. 24, 2021, 4:41 a.m. OK GNU C++14 TESTS 3 0 0
136703649 shengtongtong A Nov. 24, 2021, 4:31 a.m. OK GNU C++14 TESTS 3 0 0
136702842 y198 A Nov. 24, 2021, 4:13 a.m. OK GNU C++14 TESTS 3 0 0
136706085 hr_acharya A Nov. 24, 2021, 5:19 a.m. OK GNU C++17 TESTS 3 0 0
136706137 the_real_me A Nov. 24, 2021, 5:20 a.m. OK GNU C++17 TESTS 3 0 0
136704027 cryomancer148 A Nov. 24, 2021, 4:40 a.m. OK GNU C++17 TESTS 3 0 0
136706432 Beginner343 A Nov. 24, 2021, 5:25 a.m. OK GNU C++17 TESTS 3 0 0
136706735 devanshpareek A Nov. 24, 2021, 5:29 a.m. OK GNU C++17 TESTS 3 0 0
136707163 Acalima A Nov. 24, 2021, 5:37 a.m. OK GNU C++17 TESTS 3 0 0
136704075 moa2587 A Nov. 24, 2021, 4:41 a.m. OK GNU C++17 TESTS 3 0 0
136707492 ayush_arya A Nov. 24, 2021, 5:42 a.m. OK GNU C++17 TESTS 3 0 0
136707530 ya_s_h A Nov. 24, 2021, 5:42 a.m. OK GNU C++17 TESTS 3 0 0
136707719 coder_ravan A Nov. 24, 2021, 5:46 a.m. OK GNU C++17 TESTS 3 0 0
136703769 Rajdep_Roy A Nov. 24, 2021, 4:33 a.m. OK GNU C++17 (64) TESTS 3 0 0
136702838 rohanop A Nov. 24, 2021, 4:13 a.m. OK GNU C++17 (64) TESTS 3 0 0
136702444 nit_ay03 A Nov. 24, 2021, 4:03 a.m. OK GNU C++17 (64) TESTS 3 0 0
136699324 LacLic A Nov. 24, 2021, 2:49 a.m. OK GNU C++17 (64) TESTS 3 0 0
136708577 dufresne_1949 A Nov. 24, 2021, 5:59 a.m. OK GNU C++17 (64) TESTS 3 0 0
136705765 OnMyZenith A Nov. 24, 2021, 5:13 a.m. OK GNU C++17 (64) TESTS 3 0 0
136705600 Aero__ A Nov. 24, 2021, 5:10 a.m. OK GNU C++17 (64) TESTS 3 0 0
136704847 Starline A Nov. 24, 2021, 4:56 a.m. OK GNU C++17 (64) TESTS 3 0 0
136704149 RF_Faisal A Nov. 24, 2021, 4:42 a.m. OK GNU C++17 (64) TESTS 3 0 0
136703059 present_sir A Nov. 24, 2021, 4:18 a.m. OK GNU C++17 (64) TESTS 3 0 0
136705034 ankushbhagat14 A Nov. 24, 2021, 4:59 a.m. OK GNU C++20 (64) TESTS 3 0 0
136708399 sanjayprajapati A Nov. 24, 2021, 5:56 a.m. OK GNU C++20 (64) TESTS 3 0 0
136706924 gajendra_0180 A Nov. 24, 2021, 5:33 a.m. OK GNU C++20 (64) TESTS 3 0 0
136706909 error0180.0180 A Nov. 24, 2021, 5:33 a.m. OK GNU C++20 (64) TESTS 3 0 0
136706801 sathu.hebbar A Nov. 24, 2021, 5:31 a.m. OK GNU C++20 (64) TESTS 3 0 0
136705022 don2001 A Nov. 24, 2021, 4:59 a.m. OK GNU C++20 (64) TESTS 3 0 0
136703833 pversusnp A Nov. 24, 2021, 4:35 a.m. OK GNU C++20 (64) TESTS 3 0 0
136700569 vikassnwl A Nov. 24, 2021, 3:20 a.m. OK GNU C++20 (64) TESTS 3 0 0
136699329 Shahed_955 A Nov. 24, 2021, 2:49 a.m. OK GNU C++20 (64) TESTS 3 0 0
136698900 westsideganster A Nov. 24, 2021, 2:35 a.m. OK GNU C++20 (64) TESTS 3 0 0
136677597 vtiptop A Nov. 23, 2021, 5:26 p.m. OK Go TESTS 3 31 204800
136697338 graceoflives A Nov. 24, 2021, 1:44 a.m. OK Go TESTS 3 61 204800
136687728 prituladima A Nov. 23, 2021, 7:43 p.m. OK Java 11 TESTS 3 155 0
136708768 suchit_07 A Nov. 24, 2021, 6:02 a.m. OK Java 11 TESTS 3 155 0
136706105 sumitchavan A Nov. 24, 2021, 5:19 a.m. OK Java 11 TESTS 3 155 0
136705494 solo07 A Nov. 24, 2021, 5:08 a.m. OK Java 11 TESTS 3 155 0
136702928 krishnmohan19 A Nov. 24, 2021, 4:14 a.m. OK Java 11 TESTS 3 155 0
136688333 LongWalk A Nov. 23, 2021, 7:56 p.m. OK Java 11 TESTS 3 155 0
136705887 ayush__1411 A Nov. 24, 2021, 5:15 a.m. OK Java 11 TESTS 3 156 0
136705481 ranajoy1998 A Nov. 24, 2021, 5:08 a.m. OK Java 11 TESTS 3 170 0
136684138 AhmedMaheeb A Nov. 23, 2021, 6:37 p.m. OK Java 11 TESTS 3 170 0
136681820 singhshivsm20001 A Nov. 23, 2021, 6:06 p.m. OK Java 11 TESTS 3 170 0
136683694 vaibhav_1710 A Nov. 23, 2021, 6:30 p.m. OK Java 8 TESTS 3 78 0
136675460 nitinrishab2000 A Nov. 23, 2021, 5:13 p.m. OK Java 8 TESTS 3 92 0
136681319 piyush33patel A Nov. 23, 2021, 6 p.m. OK Java 8 TESTS 3 93 0
136685078 suyash.211.sn A Nov. 23, 2021, 6:52 p.m. OK Java 8 TESTS 3 93 0
136680671 SuvajitGhosh A Nov. 23, 2021, 5:54 p.m. OK Java 8 TESTS 3 108 0
136680087 g906360 A Nov. 23, 2021, 5:49 p.m. OK Java 8 TESTS 3 108 0
136707410 rsingh3_be18 A Nov. 24, 2021, 5:40 a.m. OK Java 8 TESTS 3 109 0
136661143 AnshX A Nov. 23, 2021, 4:03 p.m. OK Java 8 TESTS 3 109 0
136703885 2020akadaver A Nov. 24, 2021, 4:36 a.m. OK Java 8 TESTS 3 109 0
136684237 syedmizbah A Nov. 23, 2021, 6:38 p.m. OK Java 8 TESTS 3 124 0
136686854 adam.arabicbooks A Nov. 23, 2021, 7:25 p.m. OK JavaScript TESTS 3 30 1126400
136672351 mr.varga A Nov. 23, 2021, 4:54 p.m. OK Kotlin 1.4 TESTS 3 202 204800
136683380 huy.caohuyhuy123 A Nov. 23, 2021, 6:26 p.m. OK Kotlin 1.5 TESTS 3 265 0
136661215 skysky A Nov. 23, 2021, 4:03 p.m. OK MS C++ 2017 TESTS 3 15 0
136695728 thonns178 A Nov. 24, 2021, 12:38 a.m. OK MS C++ 2017 TESTS 3 15 0
136700712 A_Pier A Nov. 24, 2021, 3:24 a.m. OK MS C++ 2017 TESTS 3 46 0
136664124 DmtrPpl A Nov. 23, 2021, 4:14 p.m. OK MS C++ 2017 TESTS 3 46 0
136664439 tankistoring A Nov. 23, 2021, 4:15 p.m. OK MS C++ 2017 TESTS 3 61 0
136664946 VasyaAs A Nov. 23, 2021, 4:18 p.m. OK MS C++ 2017 TESTS 3 62 0
136666432 Damirca A Nov. 23, 2021, 4:24 p.m. OK MS C++ 2017 TESTS 3 62 0
136674132 xi-2001 A Nov. 23, 2021, 5:05 p.m. OK MS C++ 2017 TESTS 3 77 0
136685933 ansergeyg A Nov. 23, 2021, 7:07 p.m. OK .NET Core C# TESTS 3 93 2764800
136674487 NorbertG A Nov. 23, 2021, 5:07 p.m. OK .NET Core C# TESTS 3 140 2764800
136697198 Liberator187 A Nov. 24, 2021, 1:39 a.m. OK PyPy 3 TESTS 3 92 3788800
136675524 xluttiy A Nov. 23, 2021, 5:13 p.m. OK PyPy 3 TESTS 3 93 2867200
136666093 harshitkapoor A Nov. 23, 2021, 4:23 p.m. OK PyPy 3 TESTS 3 93 2867200
136702281 the_brainiac A Nov. 24, 2021, 3:59 a.m. OK PyPy 3 TESTS 3 93 4505600
136706036 saurabhbisht A Nov. 24, 2021, 5:18 a.m. OK PyPy 3 TESTS 3 109 3686400
136680989 sw_enthusiast A Nov. 23, 2021, 5:57 p.m. OK PyPy 3 TESTS 3 124 69120000
136701091 zayn. A Nov. 24, 2021, 3:33 a.m. OK PyPy 3 TESTS 3 140 5939200
136690888 Gluggs A Nov. 23, 2021, 8:59 p.m. OK PyPy 3 TESTS 3 218 5324800
136698096 Multibala A Nov. 24, 2021, 2:10 a.m. OK PyPy 3 TESTS 3 233 5017600
136699577 kaush12 A Nov. 24, 2021, 2:55 a.m. OK PyPy 3 TESTS 3 233 5529600
136678558 hsh8086 A Nov. 23, 2021, 5:31 p.m. OK PyPy 3-64 TESTS 3 78 4812800
136682833 mayank35 A Nov. 23, 2021, 6:19 p.m. OK PyPy 3-64 TESTS 3 92 4403200
136668076 raj1307 A Nov. 23, 2021, 4:32 p.m. OK PyPy 3-64 TESTS 3 92 4812800
136662838 prackode A Nov. 23, 2021, 4:09 p.m. OK PyPy 3-64 TESTS 3 93 5222400
136680722 cyberkid05 A Nov. 23, 2021, 5:54 p.m. OK PyPy 3-64 TESTS 3 93 5734400
136706316 feelme A Nov. 24, 2021, 5:23 a.m. OK PyPy 3-64 TESTS 3 108 6860800
136665431 asady529 A Nov. 23, 2021, 4:20 p.m. OK PyPy 3-64 TESTS 3 109 7987200
136692827 oadey89 A Nov. 23, 2021, 10:11 p.m. OK PyPy 3-64 TESTS 3 140 8396800
136680723 armsusman A Nov. 23, 2021, 5:54 p.m. OK PyPy 3-64 TESTS 3 171 9625600
136683115 ayush2800 A Nov. 23, 2021, 6:23 p.m. OK PyPy 3-64 TESTS 3 218 9625600
136686615 blueedge A Nov. 23, 2021, 7:21 p.m. OK Python 3 TESTS 3 31 512000
136701880 tommypranay A Nov. 24, 2021, 3:49 a.m. OK Python 3 TESTS 3 46 0
136690363 eugalt A Nov. 23, 2021, 8:41 p.m. OK Python 3 TESTS 3 46 512000
136698655 NS3081992 A Nov. 24, 2021, 2:28 a.m. OK Python 3 TESTS 3 61 102400
136697048 Vova_Arzhancev A Nov. 24, 2021, 1:34 a.m. OK Python 3 TESTS 3 61 1536000
136669267 nezzd A Nov. 23, 2021, 4:38 p.m. OK Python 3 TESTS 3 62 0
136675525 KrishNath A Nov. 23, 2021, 5:13 p.m. OK Python 3 TESTS 3 77 0
136663025 iamber A Nov. 23, 2021, 4:10 p.m. OK Python 3 TESTS 3 77 0
136678658 sjllz A Nov. 23, 2021, 5:32 p.m. OK Python 3 TESTS 3 77 1024000
136694913 astutulus A Nov. 23, 2021, 11:59 p.m. OK Python 3 TESTS 3 93 0
136674057 mikaelrocks A Nov. 23, 2021, 5:04 p.m. OK Rust TESTS 3 0 0
136708685 Spheniscine A Nov. 24, 2021, 6 a.m. OK Rust TESTS 3 15 102400
136682814 Hyrulia A Nov. 23, 2021, 6:18 p.m. OK Rust TESTS 3 77 0
136663623 bqn A Nov. 23, 2021, 4:12 p.m. OK Rust TESTS 3 93 0
136688191 inverse_ackerman A Nov. 23, 2021, 7:53 p.m. OK Rust 2021 TESTS 3 15 0

remove filters

Back to search problems