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'Vladislav has a binary square grid of n x n cells. A triangle or a square is drawn on the grid with symbols texttt{1} . As he is too busy being cool, he asks you to tell him which shape is drawn on the grid. For the given grid, determine the type of shape that is drawn on it. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The first line of each test case contains a single integer n ( 2 <= q n <= q 10 ) -- the size of the grid. The next n lines each contain n characters texttt{0} or texttt{1} . The grid contains exactly one triangle or exactly one square that contains all the texttt{1} s in the grid. It is guaranteed that the size of the triangle or square is greater than 1 (i.e., the shape cannot consist of exactly one 1). For each test case, output "SQUARE" if all the texttt{1} s in the grid form a square, and "TRIANGLE" otherwise (without quotes). '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
247367493 |
Alexander.Nikulin |
B |
Feb. 19, 2024, 4:57 p.m. |
OK |
C# 10 |
TESTS |
3 |
31 |
0 |
|
|
247404238 |
bluemegane |
B |
Feb. 19, 2024, 10:53 p.m. |
OK |
C# 8 |
TESTS |
3 |
124 |
409600 |
|
|
247426406 |
harshbardhan1326348 |
B |
Feb. 20, 2024, 5:06 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
3 |
31 |
0 |
|
|
247387385 |
RITU_RAJ_16 |
B |
Feb. 19, 2024, 7:10 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
3 |
31 |
3174400 |
|
|
247380055 |
sawan_teja |
B |
Feb. 19, 2024, 6:08 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
3 |
31 |
3174400 |
|
|
247392329 |
mahammmadel.sharkawy |
B |
Feb. 19, 2024, 8 p.m. |
OK |
Clang++20 Diagnostics |
TESTS |
3 |
31 |
0 |
|
|
247407224 |
ChenJiexi |
B |
Feb. 20, 2024, 12:09 a.m. |
OK |
Clang++20 Diagnostics |
TESTS |
3 |
31 |
3174400 |
|
|
247402886 |
Gassa |
B |
Feb. 19, 2024, 10:23 p.m. |
OK |
D |
TESTS |
3 |
15 |
204800 |
|
|
247402674 |
Gassa |
B |
Feb. 19, 2024, 10:17 p.m. |
OK |
D |
TESTS |
3 |
15 |
204800 |
|
|
247385619 |
mahrezkhan |
B |
Feb. 19, 2024, 6:53 p.m. |
OK |
GNU C11 |
TESTS |
3 |
15 |
0 |
|
|
247367357 |
anik_ghosh |
B |
Feb. 19, 2024, 4:56 p.m. |
OK |
GNU C11 |
TESTS |
3 |
15 |
0 |
|
|
247370673 |
yash_115 |
B |
Feb. 19, 2024, 5:11 p.m. |
OK |
GNU C11 |
TESTS |
3 |
15 |
0 |
|
|
247397717 |
elmiluqman |
B |
Feb. 19, 2024, 9:01 p.m. |
OK |
GNU C11 |
TESTS |
3 |
15 |
0 |
|
|
247372153 |
huymd |
B |
Feb. 19, 2024, 5:18 p.m. |
OK |
GNU C11 |
TESTS |
3 |
15 |
307200 |
|
|
247400895 |
rachid_0029 |
B |
Feb. 19, 2024, 9:45 p.m. |
OK |
GNU C11 |
TESTS |
3 |
15 |
307200 |
|
|
247390864 |
JoksimKaktus |
B |
Feb. 19, 2024, 7:44 p.m. |
OK |
GNU C11 |
TESTS |
3 |
15 |
307200 |
|
|
247390785 |
mymovies_481 |
B |
Feb. 19, 2024, 7:44 p.m. |
OK |
GNU C11 |
TESTS |
3 |
15 |
307200 |
|
|
247428606 |
laughing_philosopher |
B |
Feb. 20, 2024, 5:31 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247428137 |
zmy123456 |
B |
Feb. 20, 2024, 5:25 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247429257 |
YuJun1024 |
B |
Feb. 20, 2024, 5:39 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247429927 |
yash0650 |
B |
Feb. 20, 2024, 5:45 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247430907 |
blank2003 |
B |
Feb. 20, 2024, 5:56 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247430991 |
ramang |
B |
Feb. 20, 2024, 5:57 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247431333 |
ayushgandhewar |
B |
Feb. 20, 2024, 6:01 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247429122 |
singh.yash010702 |
B |
Feb. 20, 2024, 5:37 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247428971 |
weZnaz |
B |
Feb. 20, 2024, 5:35 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247428769 |
Sneh.Raval |
B |
Feb. 20, 2024, 5:33 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
247422589 |
MOQEE |
B |
Feb. 20, 2024, 4:14 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247422416 |
chenlixin |
B |
Feb. 20, 2024, 4:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247430499 |
mynameissyj |
B |
Feb. 20, 2024, 5:52 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247430303 |
zanifa_zini |
B |
Feb. 20, 2024, 5:50 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247429771 |
debashish_1 |
B |
Feb. 20, 2024, 5:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247429154 |
hzw_ |
B |
Feb. 20, 2024, 5:38 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247426803 |
Inverted_Tuna |
B |
Feb. 20, 2024, 5:10 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247424656 |
zwu2022015093 |
B |
Feb. 20, 2024, 4:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247423614 |
zcw666 |
B |
Feb. 20, 2024, 4:30 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247423300 |
hexuanjxm |
B |
Feb. 20, 2024, 4:25 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
247430422 |
fuadmqds |
B |
Feb. 20, 2024, 5:51 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247429905 |
__aryan_rajj |
B |
Feb. 20, 2024, 5:45 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247431131 |
sjain_17 |
B |
Feb. 20, 2024, 5:58 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247430879 |
Dhruvfor71 |
B |
Feb. 20, 2024, 5:56 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247430739 |
yanke |
B |
Feb. 20, 2024, 5:54 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247430493 |
achaudhary2304 |
B |
Feb. 20, 2024, 5:52 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247430477 |
jimi04 |
B |
Feb. 20, 2024, 5:52 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247429915 |
anilpiparaiya |
B |
Feb. 20, 2024, 5:45 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247431270 |
Sirius40 |
B |
Feb. 20, 2024, 6 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247431159 |
LastToAC |
B |
Feb. 20, 2024, 5:59 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
247420694 |
Mr.Hakimov |
B |
Feb. 20, 2024, 3:49 a.m. |
OK |
Go |
TESTS |
3 |
15 |
0 |
|
|
247393597 |
where_is_my_mind |
B |
Feb. 19, 2024, 8:13 p.m. |
OK |
Go |
TESTS |
3 |
15 |
102400 |
|
|
247370138 |
dpgl77 |
B |
Feb. 19, 2024, 5:08 p.m. |
OK |
Go |
TESTS |
3 |
30 |
102400 |
|
|
247381411 |
dm.sizov |
B |
Feb. 19, 2024, 6:18 p.m. |
OK |
Go |
TESTS |
3 |
31 |
102400 |
|
|
247392062 |
Pradeep880 |
B |
Feb. 19, 2024, 7:57 p.m. |
OK |
Java 21 |
TESTS |
3 |
170 |
0 |
|
|
247378215 |
gdax |
B |
Feb. 19, 2024, 5:55 p.m. |
OK |
Java 21 |
TESTS |
3 |
171 |
0 |
|
|
247371187 |
ItsLever |
B |
Feb. 19, 2024, 5:13 p.m. |
OK |
Java 21 |
TESTS |
3 |
202 |
0 |
|
|
247425131 |
amit_roy |
B |
Feb. 20, 2024, 4:51 a.m. |
OK |
Java 21 |
TESTS |
3 |
202 |
0 |
|
|
247420186 |
SJacob |
B |
Feb. 20, 2024, 3:42 a.m. |
OK |
Java 21 |
TESTS |
3 |
202 |
0 |
|
|
247387938 |
kbliu |
B |
Feb. 19, 2024, 7:16 p.m. |
OK |
Java 21 |
TESTS |
3 |
202 |
0 |
|
|
247378316 |
Mayank_07312003_ |
B |
Feb. 19, 2024, 5:56 p.m. |
OK |
Java 21 |
TESTS |
3 |
202 |
0 |
|
|
247416785 |
dawn_raja |
B |
Feb. 20, 2024, 2:58 a.m. |
OK |
Java 21 |
TESTS |
3 |
202 |
102400 |
|
|
247406758 |
abdelrahmansaeed948 |
B |
Feb. 19, 2024, 11:58 p.m. |
OK |
Java 21 |
TESTS |
3 |
202 |
512000 |
|
|
247427080 |
knightFighterr |
B |
Feb. 20, 2024, 5:13 a.m. |
OK |
Java 21 |
TESTS |
3 |
217 |
0 |
|
|
247384214 |
newlifer |
B |
Feb. 19, 2024, 6:42 p.m. |
OK |
Java 8 |
TESTS |
3 |
77 |
0 |
|
|
247378363 |
gdax |
B |
Feb. 19, 2024, 5:56 p.m. |
OK |
Java 8 |
TESTS |
3 |
77 |
0 |
|
|
247378315 |
gdax |
B |
Feb. 19, 2024, 5:56 p.m. |
OK |
Java 8 |
TESTS |
3 |
77 |
0 |
|
|
247421343 |
NerfThis |
B |
Feb. 20, 2024, 3:57 a.m. |
OK |
Java 8 |
TESTS |
3 |
92 |
0 |
|
|
247409000 |
duyipeng |
B |
Feb. 20, 2024, 12:45 a.m. |
OK |
Java 8 |
TESTS |
3 |
93 |
0 |
|
|
247395525 |
Safawt |
B |
Feb. 19, 2024, 8:35 p.m. |
OK |
Java 8 |
TESTS |
3 |
93 |
0 |
|
|
247371751 |
harshitha_77 |
B |
Feb. 19, 2024, 5:16 p.m. |
OK |
Java 8 |
TESTS |
3 |
93 |
0 |
|
|
247393698 |
ChetanSingh121 |
B |
Feb. 19, 2024, 8:14 p.m. |
OK |
Java 8 |
TESTS |
3 |
108 |
0 |
|
|
247386516 |
jayant24sha |
B |
Feb. 19, 2024, 7:02 p.m. |
OK |
Java 8 |
TESTS |
3 |
108 |
0 |
|
|
247425002 |
_Muhammed_Maklad |
B |
Feb. 20, 2024, 4:49 a.m. |
OK |
Java 8 |
TESTS |
3 |
109 |
0 |
|
|
247410265 |
mysh212 |
B |
Feb. 20, 2024, 1:11 a.m. |
OK |
Kotlin 1.9 |
TESTS |
3 |
108 |
0 |
|
|
247416161 |
linxiaotian |
B |
Feb. 20, 2024, 2:50 a.m. |
OK |
Kotlin 1.9 |
TESTS |
3 |
171 |
1433600 |
|
|
247425757 |
itsdhruvaggarwal |
B |
Feb. 20, 2024, 4:58 a.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
0 |
0 |
|
|
247397859 |
Sofi_ |
B |
Feb. 19, 2024, 9:03 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
0 |
0 |
|
|
247390914 |
IL1on1090 |
B |
Feb. 19, 2024, 7:45 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
0 |
0 |
|
|
247375872 |
compiler_code |
B |
Feb. 19, 2024, 5:40 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
15 |
0 |
|
|
247372623 |
compiler_code |
B |
Feb. 19, 2024, 5:20 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
15 |
0 |
|
|
247376999 |
Anonim745214 |
B |
Feb. 19, 2024, 5:47 p.m. |
OK |
PascalABC.NET |
TESTS |
3 |
264 |
0 |
|
|
247403603 |
crapcode |
B |
Feb. 19, 2024, 10:39 p.m. |
OK |
PHP |
TESTS |
3 |
15 |
0 |
|
|
247426029 |
luoingly |
B |
Feb. 20, 2024, 5:02 a.m. |
OK |
PHP |
TESTS |
3 |
46 |
0 |
|
|
247391411 |
backer01 |
B |
Feb. 19, 2024, 7:50 p.m. |
OK |
PyPy 2 |
TESTS |
3 |
93 |
307200 |
|
|
247391182 |
backer01 |
B |
Feb. 19, 2024, 7:48 p.m. |
OK |
PyPy 2 |
TESTS |
3 |
109 |
307200 |
|
|
247406677 |
ryuuichi_ |
B |
Feb. 19, 2024, 11:56 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
93 |
1536000 |
|
|
247376311 |
tahalyousfi |
B |
Feb. 19, 2024, 5:43 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
108 |
1945600 |
|
|
247408783 |
Khatarnak_Khandu |
B |
Feb. 20, 2024, 12:41 a.m. |
OK |
PyPy 3 |
TESTS |
3 |
108 |
2867200 |
|
|
247378103 |
VS34 |
B |
Feb. 19, 2024, 5:55 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
124 |
1536000 |
|
|
247430081 |
zxlored.off |
B |
Feb. 20, 2024, 5:47 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
46 |
0 |
|
|
247427680 |
Ere_meow |
B |
Feb. 20, 2024, 5:20 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
46 |
0 |
|
|
247426626 |
Azimjonm2333 |
B |
Feb. 20, 2024, 5:08 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
46 |
102400 |
|
|
247394170 |
cybsbbb |
B |
Feb. 19, 2024, 8:19 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
46 |
102400 |
|
|
247377523 |
JN.Wang |
B |
Feb. 19, 2024, 5:51 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
46 |
1638400 |
|
|
247413223 |
mikeac |
B |
Feb. 20, 2024, 2:04 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
46 |
1843200 |
|
|
247424252 |
_Ryu__ |
B |
Feb. 20, 2024, 4:38 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
61 |
0 |
|
|
247417576 |
NABIEVMEHRUBON |
B |
Feb. 20, 2024, 3:09 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
61 |
0 |
|
|
247403777 |
RobinFromTheHood |
B |
Feb. 19, 2024, 10:42 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
61 |
0 |
|
|
247423311 |
kunalseth |
B |
Feb. 20, 2024, 4:25 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
61 |
2252800 |
|
|
247405339 |
eugalt |
B |
Feb. 19, 2024, 11:21 p.m. |
OK |
Python 2 |
TESTS |
3 |
15 |
0 |
|
|
247412889 |
OLOGY |
B |
Feb. 20, 2024, 1:59 a.m. |
OK |
Python 2 |
TESTS |
3 |
31 |
0 |
|
|
247371898 |
OLOGY |
B |
Feb. 19, 2024, 5:17 p.m. |
OK |
Python 2 |
TESTS |
3 |
31 |
0 |
|
|
247367672 |
OLOGY |
B |
Feb. 19, 2024, 4:57 p.m. |
OK |
Python 2 |
TESTS |
3 |
31 |
0 |
|
|
247405292 |
eugalt |
B |
Feb. 19, 2024, 11:20 p.m. |
OK |
Python 2 |
TESTS |
3 |
46 |
0 |
|
|
247408244 |
mateoandrewquinteros |
B |
Feb. 20, 2024, 12:31 a.m. |
OK |
Python 3 |
TESTS |
3 |
15 |
0 |
|
|
247380069 |
_bigoh-1 |
B |
Feb. 19, 2024, 6:09 p.m. |
OK |
Python 3 |
TESTS |
3 |
15 |
0 |
|
|
247429702 |
Risshun |
B |
Feb. 20, 2024, 5:43 a.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
247421553 |
hushbek_2009 |
B |
Feb. 20, 2024, 4 a.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
247420825 |
bougseyy79 |
B |
Feb. 20, 2024, 3:51 a.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
247402866 |
elistark |
B |
Feb. 19, 2024, 10:22 p.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
247398521 |
fgm |
B |
Feb. 19, 2024, 9:11 p.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
247396431 |
timmy12 |
B |
Feb. 19, 2024, 8:45 p.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
247392683 |
BananaBoat_93 |
B |
Feb. 19, 2024, 8:03 p.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
247385133 |
eugalt |
B |
Feb. 19, 2024, 6:49 p.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
247377669 |
0x81 |
B |
Feb. 19, 2024, 5:52 p.m. |
OK |
Ruby 3 |
TESTS |
3 |
452 |
409600 |
|
|
247378130 |
snamy520 |
B |
Feb. 19, 2024, 5:55 p.m. |
OK |
Rust 2021 |
TESTS |
3 |
0 |
0 |
|
|
remove filters
Back to search problems