結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,992 KB
testcase_01 AC 15 ms
8,236 KB
testcase_02 AC 15 ms
8,104 KB
testcase_03 AC 16 ms
7,844 KB
testcase_04 AC 15 ms
8,260 KB
testcase_05 AC 15 ms
8,120 KB
testcase_06 AC 16 ms
8,132 KB
testcase_07 AC 15 ms
8,116 KB
testcase_08 AC 15 ms
8,116 KB
testcase_09 AC 15 ms
8,228 KB
testcase_10 AC 15 ms
8,140 KB
testcase_11 AC 15 ms
8,236 KB
testcase_12 AC 15 ms
8,208 KB
testcase_13 AC 16 ms
8,092 KB
testcase_14 AC 15 ms
8,072 KB
testcase_15 AC 15 ms
8,236 KB
testcase_16 AC 16 ms
8,244 KB
testcase_17 AC 16 ms
8,096 KB
testcase_18 AC 15 ms
8,140 KB
testcase_19 AC 16 ms
8,232 KB
testcase_20 AC 17 ms
8,180 KB
testcase_21 AC 16 ms
8,104 KB
testcase_22 AC 16 ms
8,168 KB
testcase_23 AC 16 ms
8,160 KB
testcase_24 AC 15 ms
8,244 KB
testcase_25 AC 17 ms
8,132 KB
testcase_26 AC 32 ms
9,012 KB
testcase_27 AC 30 ms
8,728 KB
testcase_28 AC 44 ms
9,232 KB
testcase_29 AC 31 ms
8,988 KB
testcase_30 AC 23 ms
8,652 KB
testcase_31 AC 29 ms
8,976 KB
testcase_32 AC 16 ms
8,280 KB
testcase_33 AC 16 ms
8,148 KB
testcase_34 AC 15 ms
8,288 KB
testcase_35 AC 16 ms
8,192 KB
testcase_36 AC 16 ms
8,308 KB
testcase_37 AC 16 ms
8,148 KB
testcase_38 AC 16 ms
8,280 KB
testcase_39 AC 15 ms
8,216 KB
testcase_40 AC 16 ms
8,152 KB
testcase_41 AC 16 ms
8,136 KB
testcase_42 AC 17 ms
8,292 KB
testcase_43 AC 17 ms
8,304 KB
testcase_44 AC 17 ms
8,168 KB
testcase_45 AC 18 ms
7,952 KB
testcase_46 AC 16 ms
8,276 KB
testcase_47 AC 18 ms
8,188 KB
testcase_48 AC 16 ms
8,276 KB
testcase_49 AC 17 ms
8,304 KB
testcase_50 AC 43 ms
10,064 KB
testcase_51 AC 49 ms
10,036 KB
testcase_52 AC 52 ms
9,884 KB
testcase_53 AC 77 ms
15,048 KB
testcase_54 AC 51 ms
10,332 KB
testcase_55 AC 49 ms
10,840 KB
testcase_56 AC 59 ms
10,660 KB
testcase_57 AC 17 ms
8,184 KB
testcase_58 AC 17 ms
8,184 KB
testcase_59 AC 16 ms
8,268 KB
testcase_60 AC 17 ms
8,188 KB
testcase_61 AC 16 ms
7,908 KB
testcase_62 AC 18 ms
8,336 KB
testcase_63 AC 17 ms
8,148 KB
testcase_64 AC 16 ms
8,292 KB
testcase_65 AC 104 ms
18,452 KB
testcase_66 AC 104 ms
18,544 KB
testcase_67 AC 106 ms
18,576 KB
testcase_68 AC 104 ms
18,460 KB
testcase_69 AC 31 ms
9,124 KB
testcase_70 AC 31 ms
9,116 KB
testcase_71 AC 103 ms
18,488 KB
testcase_72 AC 32 ms
9,168 KB
testcase_73 AC 15 ms
8,296 KB
testcase_74 AC 21 ms
8,564 KB
testcase_75 AC 29 ms
8,924 KB
testcase_76 AC 21 ms
8,532 KB
testcase_77 AC 38 ms
8,936 KB
testcase_78 AC 17 ms
8,284 KB
testcase_79 AC 29 ms
8,896 KB
testcase_80 AC 40 ms
8,944 KB
testcase_81 AC 27 ms
8,756 KB
testcase_82 AC 39 ms
9,032 KB
testcase_83 AC 23 ms
8,756 KB
testcase_84 AC 32 ms
9,084 KB
testcase_85 AC 32 ms
8,868 KB
testcase_86 AC 26 ms
8,780 KB
testcase_87 AC 28 ms
8,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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