結果

問題 No.923 オセロきりきざむたん
ユーザー ptotqptotq
提出日時 2019-11-08 23:36:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 10,796 KB
実行使用メモリ 18,588 KB
最終ジャッジ日時 2023-10-13 05:36:29
合計ジャッジ時間 5,210 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,856 KB
testcase_01 AC 15 ms
8,232 KB
testcase_02 AC 15 ms
8,236 KB
testcase_03 AC 15 ms
7,864 KB
testcase_04 AC 15 ms
8,116 KB
testcase_05 AC 15 ms
8,136 KB
testcase_06 AC 15 ms
8,292 KB
testcase_07 AC 16 ms
8,092 KB
testcase_08 AC 16 ms
8,092 KB
testcase_09 AC 15 ms
8,276 KB
testcase_10 AC 15 ms
8,272 KB
testcase_11 AC 15 ms
8,236 KB
testcase_12 AC 15 ms
8,116 KB
testcase_13 AC 15 ms
8,112 KB
testcase_14 AC 16 ms
8,096 KB
testcase_15 AC 15 ms
8,116 KB
testcase_16 AC 15 ms
8,172 KB
testcase_17 AC 15 ms
8,096 KB
testcase_18 AC 15 ms
8,124 KB
testcase_19 AC 15 ms
8,124 KB
testcase_20 AC 17 ms
8,212 KB
testcase_21 AC 16 ms
8,264 KB
testcase_22 AC 16 ms
8,148 KB
testcase_23 AC 16 ms
8,156 KB
testcase_24 AC 16 ms
8,292 KB
testcase_25 AC 16 ms
8,144 KB
testcase_26 AC 33 ms
9,008 KB
testcase_27 AC 31 ms
8,916 KB
testcase_28 AC 43 ms
9,144 KB
testcase_29 AC 31 ms
9,156 KB
testcase_30 AC 23 ms
8,648 KB
testcase_31 AC 29 ms
8,792 KB
testcase_32 AC 15 ms
8,320 KB
testcase_33 AC 16 ms
8,132 KB
testcase_34 AC 15 ms
8,296 KB
testcase_35 AC 15 ms
8,168 KB
testcase_36 AC 15 ms
8,284 KB
testcase_37 AC 15 ms
8,308 KB
testcase_38 AC 15 ms
8,296 KB
testcase_39 AC 15 ms
8,108 KB
testcase_40 AC 16 ms
8,140 KB
testcase_41 AC 16 ms
8,184 KB
testcase_42 AC 16 ms
8,300 KB
testcase_43 AC 16 ms
8,104 KB
testcase_44 AC 16 ms
8,312 KB
testcase_45 AC 17 ms
7,996 KB
testcase_46 AC 16 ms
8,164 KB
testcase_47 AC 17 ms
8,268 KB
testcase_48 AC 16 ms
8,148 KB
testcase_49 AC 16 ms
8,308 KB
testcase_50 AC 44 ms
10,016 KB
testcase_51 AC 50 ms
10,156 KB
testcase_52 AC 53 ms
9,780 KB
testcase_53 AC 78 ms
14,996 KB
testcase_54 AC 53 ms
10,284 KB
testcase_55 AC 50 ms
10,880 KB
testcase_56 AC 58 ms
10,888 KB
testcase_57 AC 17 ms
8,316 KB
testcase_58 AC 17 ms
8,292 KB
testcase_59 AC 17 ms
8,312 KB
testcase_60 AC 17 ms
8,204 KB
testcase_61 AC 16 ms
7,844 KB
testcase_62 AC 17 ms
8,428 KB
testcase_63 AC 17 ms
8,304 KB
testcase_64 AC 16 ms
8,348 KB
testcase_65 AC 110 ms
18,568 KB
testcase_66 AC 108 ms
18,424 KB
testcase_67 AC 109 ms
18,428 KB
testcase_68 AC 109 ms
18,424 KB
testcase_69 AC 31 ms
9,032 KB
testcase_70 AC 31 ms
9,084 KB
testcase_71 AC 107 ms
18,588 KB
testcase_72 AC 31 ms
9,080 KB
testcase_73 AC 15 ms
8,136 KB
testcase_74 AC 21 ms
8,576 KB
testcase_75 AC 28 ms
8,748 KB
testcase_76 AC 22 ms
8,524 KB
testcase_77 AC 37 ms
8,888 KB
testcase_78 AC 17 ms
8,348 KB
testcase_79 AC 29 ms
8,944 KB
testcase_80 AC 41 ms
8,964 KB
testcase_81 AC 27 ms
8,716 KB
testcase_82 AC 39 ms
9,072 KB
testcase_83 AC 23 ms
8,660 KB
testcase_84 AC 31 ms
9,084 KB
testcase_85 AC 32 ms
8,760 KB
testcase_86 AC 26 ms
8,804 KB
testcase_87 AC 27 ms
8,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
H, W = map(int, input().split())
a = [list(map(int, sys.stdin.readline().rstrip())) for _ in range(H)]

if all(len(set(l)) == 2 for l in a):
    print('YES')
    exit()
for x in range(W):
    v = [0, 0]
    for y in range(H):
        v[a[y][x]] = 1
    if v[0] == 0 or v[1] == 0:
        print('NO')
        exit()
print('YES')
0