結果

問題 No.923 オセロきりきざむたん
ユーザー titiatitia
提出日時 2019-11-08 23:11:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 273 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,920 KB
実行使用メモリ 18,380 KB
最終ジャッジ日時 2023-10-13 05:35:50
合計ジャッジ時間 6,339 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,192 KB
testcase_01 AC 16 ms
7,920 KB
testcase_02 AC 15 ms
7,920 KB
testcase_03 AC 16 ms
8,248 KB
testcase_04 AC 16 ms
7,852 KB
testcase_05 AC 15 ms
8,148 KB
testcase_06 AC 15 ms
8,280 KB
testcase_07 AC 15 ms
7,836 KB
testcase_08 AC 15 ms
8,124 KB
testcase_09 AC 15 ms
8,100 KB
testcase_10 AC 15 ms
8,164 KB
testcase_11 AC 16 ms
8,244 KB
testcase_12 AC 15 ms
7,868 KB
testcase_13 AC 15 ms
7,784 KB
testcase_14 AC 15 ms
8,192 KB
testcase_15 AC 15 ms
8,196 KB
testcase_16 AC 15 ms
7,820 KB
testcase_17 AC 16 ms
7,856 KB
testcase_18 AC 15 ms
7,788 KB
testcase_19 AC 16 ms
8,084 KB
testcase_20 AC 16 ms
8,336 KB
testcase_21 AC 15 ms
7,956 KB
testcase_22 AC 16 ms
8,332 KB
testcase_23 AC 16 ms
8,180 KB
testcase_24 AC 16 ms
7,828 KB
testcase_25 AC 16 ms
8,280 KB
testcase_26 AC 39 ms
9,208 KB
testcase_27 AC 32 ms
9,108 KB
testcase_28 AC 48 ms
9,000 KB
testcase_29 AC 32 ms
9,144 KB
testcase_30 AC 24 ms
8,576 KB
testcase_31 AC 31 ms
8,852 KB
testcase_32 AC 16 ms
7,932 KB
testcase_33 AC 16 ms
7,828 KB
testcase_34 AC 16 ms
7,796 KB
testcase_35 AC 16 ms
7,856 KB
testcase_36 AC 16 ms
8,144 KB
testcase_37 AC 15 ms
7,760 KB
testcase_38 AC 16 ms
8,148 KB
testcase_39 AC 16 ms
8,116 KB
testcase_40 AC 16 ms
7,824 KB
testcase_41 AC 16 ms
7,984 KB
testcase_42 AC 15 ms
7,832 KB
testcase_43 AC 16 ms
7,800 KB
testcase_44 AC 16 ms
7,784 KB
testcase_45 AC 19 ms
8,224 KB
testcase_46 AC 16 ms
8,132 KB
testcase_47 AC 18 ms
8,212 KB
testcase_48 AC 16 ms
8,176 KB
testcase_49 AC 16 ms
7,824 KB
testcase_50 AC 67 ms
10,076 KB
testcase_51 AC 78 ms
10,040 KB
testcase_52 AC 78 ms
9,992 KB
testcase_53 AC 163 ms
14,848 KB
testcase_54 AC 83 ms
10,392 KB
testcase_55 AC 82 ms
10,716 KB
testcase_56 AC 87 ms
10,724 KB
testcase_57 AC 18 ms
8,384 KB
testcase_58 AC 17 ms
8,328 KB
testcase_59 AC 17 ms
8,192 KB
testcase_60 AC 17 ms
8,224 KB
testcase_61 AC 17 ms
8,328 KB
testcase_62 AC 19 ms
8,304 KB
testcase_63 AC 17 ms
8,240 KB
testcase_64 AC 18 ms
7,780 KB
testcase_65 AC 266 ms
18,328 KB
testcase_66 AC 270 ms
18,308 KB
testcase_67 AC 263 ms
18,328 KB
testcase_68 AC 273 ms
18,280 KB
testcase_69 AC 31 ms
9,636 KB
testcase_70 AC 32 ms
9,736 KB
testcase_71 AC 261 ms
18,380 KB
testcase_72 AC 32 ms
9,580 KB
testcase_73 AC 16 ms
8,276 KB
testcase_74 AC 21 ms
8,500 KB
testcase_75 AC 30 ms
8,856 KB
testcase_76 AC 22 ms
8,476 KB
testcase_77 AC 37 ms
8,840 KB
testcase_78 AC 18 ms
8,268 KB
testcase_79 AC 34 ms
9,008 KB
testcase_80 AC 46 ms
9,076 KB
testcase_81 AC 29 ms
8,792 KB
testcase_82 AC 45 ms
9,016 KB
testcase_83 AC 23 ms
8,812 KB
testcase_84 AC 31 ms
9,204 KB
testcase_85 AC 33 ms
8,784 KB
testcase_86 AC 26 ms
8,716 KB
testcase_87 AC 27 ms
8,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

H,W=map(int,input().split())
A=[list(map(int,list(input()))) for i in range(H)]

for i in range(H):
    if 0<A[i].count(1)<W:
        continue
    else:
        break
else:
    print("YES")
    sys.exit()

for i in range(W):
    count=0
    for j in range(H):
        if A[j][i]==1:
            count+=1
    if 0<count<H:
        continue
    else:
        break
else:
    print("YES")
    sys.exit()

print("NO")
0