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.
Problems
B"Given a n by m grid consisting of '.' and '#' characters, there exists a whole manhattan circle on the grid. The top left corner of the grid has coordinates (1,1) , and the bottom right corner has coordinates (n, m) . Point ( a, b ) belongs to the manhattan circle centered at ( h, k ) if |h - a| + |k - b| < r , where r is a positive constant. On the grid, the set of points that are part of the manhattan circle is marked as '#'. Find the coordinates of the center of the circle. The first line contains t ( 1 <= q t <= q 1000 ) -- the number of test cases. The first line of each test case contains n and m ( 1 <= q n cdot m <= q 2 cdot 10^5 ) -- the height and width of the grid, respectively. The next n lines contains m characters '.' or '#'. If the character is '#', then the point is part of the manhattan circle. It is guaranteed the sum of n cdot m over all test cases does not exceed 2 cdot 10^5 , and there is a whole manhattan circle on the grid. For each test case, output the two integers, the coordinates of the center of the circle. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
265391504 |
NICK_04 |
D |
June 11, 2024, 5:40 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265439207 |
apurvoj_23 |
D |
June 12, 2024, 5:15 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265438977 |
Xujj |
D |
June 12, 2024, 5:13 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265437380 |
8a207thanhdat |
D |
June 12, 2024, 4:55 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265434718 |
ShengaTime |
D |
June 12, 2024, 4:23 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265433915 |
MinhThang |
D |
June 12, 2024, 4:13 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265424150 |
qmtdearu |
D |
June 12, 2024, 1:59 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265396990 |
Kookie_0919 |
D |
June 11, 2024, 6:17 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265392145 |
vishal2045ks |
D |
June 11, 2024, 5:45 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265391935 |
mistryman |
D |
June 11, 2024, 5:43 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
8 |
46 |
0 |
|
|
265423918 |
PSG19 |
D |
June 12, 2024, 1:54 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
31 |
0 |
|
|
265442515 |
M-D-2003 |
D |
June 12, 2024, 5:47 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
46 |
0 |
|
|
265444133 |
abhishekkumar20 |
D |
June 12, 2024, 6:02 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
46 |
0 |
|
|
265443922 |
solver___ |
D |
June 12, 2024, 6 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
46 |
0 |
|
|
265443419 |
om_2179 |
D |
June 12, 2024, 5:55 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
46 |
0 |
|
|
265443267 |
ayush28 |
D |
June 12, 2024, 5:54 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
46 |
0 |
|
|
265443254 |
Md_Rizabul |
D |
June 12, 2024, 5:54 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
46 |
0 |
|
|
265443034 |
raj_001 |
D |
June 12, 2024, 5:52 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
46 |
0 |
|
|
265442522 |
cheemu |
D |
June 12, 2024, 5:48 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
46 |
0 |
|
|
265442422 |
hasib777 |
D |
June 12, 2024, 5:47 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
8 |
46 |
0 |
|
|
265439640 |
chandrahas7c |
D |
June 12, 2024, 5:20 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
31 |
102400 |
|
|
265425254 |
khanshamim8134 |
D |
June 12, 2024, 2:17 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
31 |
102400 |
|
|
265440476 |
vikasanand.darkmatter |
D |
June 12, 2024, 5:28 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
46 |
0 |
|
|
265444075 |
khos |
D |
June 12, 2024, 6:02 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
46 |
0 |
|
|
265443791 |
MahmytM |
D |
June 12, 2024, 5:59 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
46 |
0 |
|
|
265442541 |
Jins |
D |
June 12, 2024, 5:48 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
46 |
0 |
|
|
265442480 |
suseelkumar2006 |
D |
June 12, 2024, 5:47 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
46 |
0 |
|
|
265441215 |
GoymyGo |
D |
June 12, 2024, 5:35 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
46 |
0 |
|
|
265441212 |
lan_10 |
D |
June 12, 2024, 5:35 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
46 |
0 |
|
|
265441004 |
ValaHardikV08 |
D |
June 12, 2024, 5:33 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
8 |
46 |
0 |
|
|
265422902 |
bluemegane |
D |
June 12, 2024, 1:35 a.m. |
OK |
C# 8 |
TESTS |
8 |
93 |
3174400 |
|
|
265395958 |
NenadDapic |
D |
June 11, 2024, 6:08 p.m. |
OK |
FPC |
TESTS |
8 |
77 |
0 |
|
|
265398981 |
Yashwanth_5036 |
D |
June 11, 2024, 6:34 p.m. |
OK |
GNU C11 |
TESTS |
8 |
93 |
204800 |
|
|
265435307 |
xylu |
D |
June 12, 2024, 4:30 a.m. |
OK |
Go |
TESTS |
8 |
46 |
2048000 |
|
|
265417982 |
crapcode |
D |
June 11, 2024, 11:33 p.m. |
OK |
Go |
TESTS |
8 |
61 |
1843200 |
|
|
265414265 |
1936557 |
D |
June 11, 2024, 9:56 p.m. |
OK |
Haskell |
TESTS |
8 |
155 |
30924800 |
|
|
265395680 |
OsamaNassar |
D |
June 11, 2024, 6:06 p.m. |
OK |
Java 21 |
TESTS |
8 |
233 |
819200 |
|
|
265427014 |
Freedom_lifelong |
D |
June 12, 2024, 2:43 a.m. |
OK |
Java 21 |
TESTS |
8 |
249 |
819200 |
|
|
265414594 |
mashurov2028 |
D |
June 11, 2024, 10:04 p.m. |
OK |
Java 21 |
TESTS |
8 |
264 |
819200 |
|
|
265414496 |
Eslam_Ahmed |
D |
June 11, 2024, 10:02 p.m. |
OK |
Java 21 |
TESTS |
8 |
280 |
614400 |
|
|
265418093 |
SaifVelly |
D |
June 11, 2024, 11:36 p.m. |
OK |
Java 21 |
TESTS |
8 |
280 |
1228800 |
|
|
265400826 |
Shivam_m1602 |
D |
June 11, 2024, 6:54 p.m. |
OK |
Java 21 |
TESTS |
8 |
281 |
1331200 |
|
|
265391854 |
ramitg254 |
D |
June 11, 2024, 5:42 p.m. |
OK |
Java 21 |
TESTS |
8 |
296 |
716800 |
|
|
265432440 |
Paulieaditya |
D |
June 12, 2024, 3:55 a.m. |
OK |
Java 21 |
TESTS |
8 |
296 |
1740800 |
|
|
265430997 |
IrhamMA |
D |
June 12, 2024, 3:36 a.m. |
OK |
Java 21 |
TESTS |
8 |
311 |
512000 |
|
|
265391744 |
anubhavRoy_1305 |
D |
June 11, 2024, 5:42 p.m. |
OK |
Java 21 |
TESTS |
8 |
312 |
819200 |
|
|
265437894 |
coderman2004 |
D |
June 12, 2024, 5:01 a.m. |
OK |
Java 8 |
TESTS |
8 |
156 |
0 |
|
|
265399990 |
rk6263 |
D |
June 11, 2024, 6:45 p.m. |
OK |
Java 8 |
TESTS |
8 |
171 |
0 |
|
|
265397854 |
prashant_pathak_01 |
D |
June 11, 2024, 6:24 p.m. |
OK |
Java 8 |
TESTS |
8 |
187 |
0 |
|
|
265431903 |
ankushtyagi |
D |
June 12, 2024, 3:48 a.m. |
OK |
Java 8 |
TESTS |
8 |
202 |
0 |
|
|
265427423 |
rocean07 |
D |
June 12, 2024, 2:49 a.m. |
OK |
Java 8 |
TESTS |
8 |
202 |
0 |
|
|
265405374 |
Sarthak_Kharka |
D |
June 11, 2024, 7:44 p.m. |
OK |
Java 8 |
TESTS |
8 |
202 |
0 |
|
|
265398583 |
ak65223167 |
D |
June 11, 2024, 6:31 p.m. |
OK |
Java 8 |
TESTS |
8 |
202 |
0 |
|
|
265394565 |
vamshivasala249 |
D |
June 11, 2024, 5:57 p.m. |
OK |
Java 8 |
TESTS |
8 |
217 |
0 |
|
|
265396804 |
TheBoogeyman_429 |
D |
June 11, 2024, 6:15 p.m. |
OK |
Java 8 |
TESTS |
8 |
234 |
0 |
|
|
265418242 |
Anshima |
D |
June 11, 2024, 11:40 p.m. |
OK |
Java 8 |
TESTS |
8 |
249 |
0 |
|
|
265403377 |
kshitij__18 |
D |
June 11, 2024, 7:21 p.m. |
OK |
JavaScript |
TESTS |
8 |
109 |
9830400 |
|
|
265394894 |
Lyamzin_alexandr |
D |
June 11, 2024, 6 p.m. |
OK |
Kotlin 1.7 |
TESTS |
8 |
405 |
8908800 |
|
|
265423567 |
gouravasdeo11 |
D |
June 12, 2024, 1:48 a.m. |
OK |
Kotlin 1.9 |
TESTS |
8 |
202 |
0 |
|
|
265404550 |
DAGGERWRATH |
D |
June 11, 2024, 7:35 p.m. |
OK |
PyPy 3 |
TESTS |
8 |
374 |
8396800 |
|
|
265433520 |
Madhav_08 |
D |
June 12, 2024, 4:09 a.m. |
OK |
PyPy 3 |
TESTS |
8 |
390 |
9420800 |
|
|
265405373 |
perfect_dash |
D |
June 11, 2024, 7:44 p.m. |
OK |
PyPy 3 |
TESTS |
8 |
390 |
9625600 |
|
|
265402075 |
Kefrov |
D |
June 11, 2024, 7:06 p.m. |
OK |
PyPy 3 |
TESTS |
8 |
390 |
9625600 |
|
|
265430416 |
CbFb |
D |
June 12, 2024, 3:29 a.m. |
OK |
PyPy 3 |
TESTS |
8 |
405 |
9523200 |
|
|
265398845 |
hohohohohohong |
D |
June 11, 2024, 6:33 p.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
93 |
3481600 |
|
|
265401702 |
gardengnome |
D |
June 11, 2024, 7:03 p.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
93 |
6451200 |
|
|
265395021 |
devjain1028 |
D |
June 11, 2024, 6:01 p.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
108 |
2969600 |
|
|
265430728 |
fightinggoose |
D |
June 12, 2024, 3:33 a.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
108 |
3174400 |
|
|
265416594 |
NitroSpear |
D |
June 11, 2024, 10:56 p.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
108 |
3174400 |
|
|
265391270 |
AyuAnchor |
D |
June 11, 2024, 5:38 p.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
108 |
5939200 |
|
|
265443733 |
ProCoder12 |
D |
June 12, 2024, 5:58 a.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
109 |
3276800 |
|
|
265415496 |
mgoldy925 |
D |
June 11, 2024, 10:28 p.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
109 |
7475200 |
|
|
265435447 |
Youarenotgood |
D |
June 12, 2024, 4:31 a.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
109 |
9216000 |
|
|
265405297 |
jiangjinjinyxt |
D |
June 11, 2024, 7:43 p.m. |
OK |
PyPy 3-64 |
TESTS |
8 |
124 |
9625600 |
|
|
265398580 |
tohuboliver |
D |
June 11, 2024, 6:30 p.m. |
OK |
Python 3 |
TESTS |
8 |
108 |
0 |
|
|
265437038 |
impoStore |
D |
June 12, 2024, 4:51 a.m. |
OK |
Python 3 |
TESTS |
8 |
124 |
0 |
|
|
265397272 |
oibela |
D |
June 11, 2024, 6:19 p.m. |
OK |
Python 3 |
TESTS |
8 |
124 |
1024000 |
|
|
265432788 |
vinuhacker |
D |
June 12, 2024, 3:59 a.m. |
OK |
Python 3 |
TESTS |
8 |
125 |
0 |
|
|
265392461 |
Nas |
D |
June 11, 2024, 5:47 p.m. |
OK |
Python 3 |
TESTS |
8 |
140 |
7577600 |
|
|
265396819 |
ananyaGawade |
D |
June 11, 2024, 6:15 p.m. |
OK |
Python 3 |
TESTS |
8 |
140 |
8294400 |
|
|
265397958 |
eugalt |
D |
June 11, 2024, 6:25 p.m. |
OK |
Python 3 |
TESTS |
8 |
140 |
26828800 |
|
|
265393880 |
eugalt |
D |
June 11, 2024, 5:52 p.m. |
OK |
Python 3 |
TESTS |
8 |
155 |
102400 |
|
|
265394692 |
saif_reyad |
D |
June 11, 2024, 5:58 p.m. |
OK |
Python 3 |
TESTS |
8 |
155 |
1228800 |
|
|
265396793 |
karnrahul786 |
D |
June 11, 2024, 6:15 p.m. |
OK |
Python 3 |
TESTS |
8 |
155 |
7577600 |
|
|
265438634 |
10000 |
D |
June 12, 2024, 5:09 a.m. |
OK |
Rust 2021 |
TESTS |
8 |
46 |
0 |
|
|
265401219 |
vstiff |
D |
June 11, 2024, 6:58 p.m. |
OK |
Rust 2021 |
TESTS |
8 |
62 |
0 |
|
|
265420176 |
DreadedHippy |
D |
June 12, 2024, 12:31 a.m. |
OK |
Rust 2021 |
TESTS |
8 |
77 |
2560000 |
|
|
remove filters
Back to search problems