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"According to a new ISO standard, a flag of every country should have a chequered field n xe2 x80 x89 xc3 x97 xe2 x80 x89m, each square should be of one of 10 colours, and the flag should be xc2 xabstriped xc2 xbb: each horizontal row of the flag should contain squares of the same colour, and the colours of adjacent horizontal rows should be different. Berland's government asked you to find out whether their flag meets the new ISO standard. The first line of the input contains numbers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100), n -- the amount of rows, m -- the amount of columns on the flag of Berland. Then there follows the description of the flag: each of the following n lines contain m characters. Each character is a digit between 0 and 9, and stands for the colour of the corresponding square. Output YES, if the flag meets the new ISO standard, and NO otherwise."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
69919 |
pheonix |
A |
June 3, 2010, 1:17 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
819200 |
|
1100 |
69485 |
ghd666hw |
A |
June 3, 2010, 1:04 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
819200 |
|
1100 |
69752 |
Serega |
A |
June 3, 2010, 1:13 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
921600 |
|
1100 |
69603 |
ant.ermilov |
A |
June 3, 2010, 1:08 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
921600 |
|
1100 |
69531 |
pva701 |
A |
June 3, 2010, 1:06 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
921600 |
|
1100 |
69444 |
sankear |
A |
June 3, 2010, 1:03 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
921600 |
|
1100 |
71332 |
mac_md |
A |
June 3, 2010, 2:11 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
921600 |
|
1100 |
69892 |
Abra |
A |
June 3, 2010, 1:17 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
921600 |
|
1100 |
69579 |
GennadiyChistyakov |
A |
June 3, 2010, 1:07 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
1945600 |
|
1100 |
69488 |
pershik |
A |
June 3, 2010, 1:04 p.m. |
OK |
Delphi |
TESTS |
35 |
30 |
1945600 |
|
1100 |
70347 |
abzaloid |
A |
June 3, 2010, 1:31 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1024000 |
|
1100 |
71199 |
Denor |
A |
June 3, 2010, 2:05 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1024000 |
|
1100 |
70847 |
oskirych |
A |
June 3, 2010, 1:50 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1024000 |
|
1100 |
70394 |
PAG |
A |
June 3, 2010, 1:33 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1024000 |
|
1100 |
69971 |
Boykov |
A |
June 3, 2010, 1:19 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1024000 |
|
1100 |
69962 |
xmas169 |
A |
June 3, 2010, 1:19 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1024000 |
|
1100 |
69463 |
vilcheuski |
A |
June 3, 2010, 1:03 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1024000 |
|
1100 |
69457 |
sdryapko |
A |
June 3, 2010, 1:03 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1024000 |
|
1100 |
69637 |
nhok_kot |
A |
June 3, 2010, 1:09 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1126400 |
|
1100 |
70059 |
windoanvn |
A |
June 3, 2010, 1:22 p.m. |
OK |
FPC |
TESTS |
35 |
30 |
1228800 |
|
1100 |
71683 |
fookwood |
A |
June 3, 2010, 2:26 p.m. |
OK |
GNU C |
TESTS |
35 |
30 |
1331200 |
|
1100 |
70207 |
shankhs |
A |
June 3, 2010, 1:27 p.m. |
OK |
GNU C |
TESTS |
35 |
30 |
1331200 |
|
1100 |
69723 |
o948 |
A |
June 3, 2010, 1:12 p.m. |
OK |
GNU C |
TESTS |
35 |
30 |
1331200 |
|
1100 |
69540 |
china.zhangchenzi |
A |
June 3, 2010, 1:06 p.m. |
OK |
GNU C |
TESTS |
35 |
30 |
1331200 |
|
1100 |
69794 |
javran |
A |
June 3, 2010, 1:14 p.m. |
OK |
GNU C |
TESTS |
35 |
50 |
1331200 |
|
1100 |
70163 |
dark.coder |
A |
June 3, 2010, 1:26 p.m. |
OK |
GNU C++ |
TESTS |
35 |
10 |
1331200 |
|
1100 |
70886 |
nayimsust |
A |
June 3, 2010, 1:52 p.m. |
OK |
GNU C++ |
TESTS |
35 |
10 |
6348800 |
|
1100 |
70732 |
rafaeljack3 |
A |
June 3, 2010, 1:46 p.m. |
OK |
GNU C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
71982 |
msh_shiplu |
A |
June 3, 2010, 2:40 p.m. |
OK |
GNU C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
71907 |
elizavvc |
A |
June 3, 2010, 2:37 p.m. |
OK |
GNU C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
71643 |
yvasyliv |
A |
June 3, 2010, 2:24 p.m. |
OK |
GNU C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
71183 |
sujz |
A |
June 3, 2010, 2:05 p.m. |
OK |
GNU C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
70773 |
qwrq |
A |
June 3, 2010, 1:48 p.m. |
OK |
GNU C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
70735 |
dennismv |
A |
June 3, 2010, 1:46 p.m. |
OK |
GNU C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
70703 |
sea_ashari |
A |
June 3, 2010, 1:44 p.m. |
OK |
GNU C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
69858 |
segoon |
A |
June 3, 2010, 1:16 p.m. |
OK |
Haskell |
TESTS |
35 |
30 |
2048000 |
|
1100 |
69492 |
Kandyman |
A |
June 3, 2010, 1:05 p.m. |
OK |
Java 6 |
TESTS |
35 |
60 |
42188800 |
|
1100 |
70812 |
sjbr |
A |
June 3, 2010, 1:49 p.m. |
OK |
Java 6 |
TESTS |
35 |
60 |
42188800 |
|
1100 |
70141 |
debmalya.jash |
A |
June 3, 2010, 1:25 p.m. |
OK |
Java 6 |
TESTS |
35 |
60 |
42188800 |
|
1100 |
69586 |
agus.mw |
A |
June 3, 2010, 1:08 p.m. |
OK |
Java 6 |
TESTS |
35 |
60 |
42188800 |
|
1100 |
69613 |
tomerun |
A |
June 3, 2010, 1:08 p.m. |
OK |
Java 6 |
TESTS |
35 |
80 |
42188800 |
|
1100 |
69578 |
Shafer |
A |
June 3, 2010, 1:07 p.m. |
OK |
Java 6 |
TESTS |
35 |
80 |
42188800 |
|
1100 |
72215 |
Mirovan |
A |
June 3, 2010, 2:50 p.m. |
OK |
Java 6 |
TESTS |
35 |
80 |
42188800 |
|
1100 |
70613 |
sirhally |
A |
June 3, 2010, 1:41 p.m. |
OK |
Java 6 |
TESTS |
35 |
80 |
42188800 |
|
1100 |
69617 |
Rustem |
A |
June 3, 2010, 1:08 p.m. |
OK |
Java 6 |
TESTS |
35 |
80 |
42188800 |
|
1100 |
69551 |
swcai |
A |
June 3, 2010, 1:07 p.m. |
OK |
Java 6 |
TESTS |
35 |
80 |
42188800 |
|
1100 |
69520 |
Tactic |
A |
June 3, 2010, 1:05 p.m. |
OK |
Mono C# |
TESTS |
35 |
110 |
5939200 |
|
1100 |
69728 |
chandubaba |
A |
June 3, 2010, 1:12 p.m. |
OK |
Mono C# |
TESTS |
35 |
110 |
6041600 |
|
1100 |
69680 |
TryCSharp |
A |
June 3, 2010, 1:11 p.m. |
OK |
Mono C# |
TESTS |
35 |
130 |
6041600 |
|
1100 |
70446 |
a286729485 |
A |
June 3, 2010, 1:35 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
71898 |
MrBlack |
A |
June 3, 2010, 2:37 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
71825 |
Tkei |
A |
June 3, 2010, 2:33 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
70620 |
d.a.sukhodolov |
A |
June 3, 2010, 1:42 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
70465 |
khayyam |
A |
June 3, 2010, 1:36 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
70134 |
blackperl |
A |
June 3, 2010, 1:25 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
70031 |
antonkov |
A |
June 3, 2010, 1:21 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
70023 |
lyrics |
A |
June 3, 2010, 1:21 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
69935 |
JKeeJ1e30 |
A |
June 3, 2010, 1:18 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
69891 |
ramil |
A |
June 3, 2010, 1:16 p.m. |
OK |
MS C++ |
TESTS |
35 |
30 |
1331200 |
|
1100 |
71154 |
Kalni |
A |
June 3, 2010, 2:04 p.m. |
OK |
Python 2 |
TESTS |
35 |
60 |
2764800 |
|
1100 |
69923 |
asitak |
A |
June 3, 2010, 1:18 p.m. |
OK |
Python 2 |
TESTS |
35 |
60 |
2764800 |
|
1100 |
69720 |
shiumachi |
A |
June 3, 2010, 1:12 p.m. |
OK |
Python 2 |
TESTS |
35 |
60 |
2764800 |
|
1100 |
69602 |
jaindsonvs |
A |
June 3, 2010, 1:08 p.m. |
OK |
Python 2 |
TESTS |
35 |
60 |
2764800 |
|
1100 |
69498 |
insejniasty |
A |
June 3, 2010, 1:05 p.m. |
OK |
Python 2 |
TESTS |
35 |
60 |
2764800 |
|
1100 |
70302 |
xydinesh |
A |
June 3, 2010, 1:30 p.m. |
OK |
Python 2 |
TESTS |
35 |
80 |
2764800 |
|
1100 |
69734 |
urutom |
A |
June 3, 2010, 1:12 p.m. |
OK |
Ruby |
TESTS |
35 |
60 |
3891200 |
|
1100 |
remove filters
Back to search problems