結果
問題 | No.923 オセロきりきざむたん |
ユーザー | maspy |
提出日時 | 2020-03-23 17:19:41 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 552 ms / 2,000 ms |
コード長 | 569 bytes |
コンパイル時間 | 107 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 44,612 KB |
最終ジャッジ日時 | 2024-06-08 00:41:53 |
合計ジャッジ時間 | 48,254 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 493 ms
44,220 KB |
testcase_01 | AC | 493 ms
43,964 KB |
testcase_02 | AC | 492 ms
43,844 KB |
testcase_03 | AC | 490 ms
43,836 KB |
testcase_04 | AC | 485 ms
43,956 KB |
testcase_05 | AC | 495 ms
43,964 KB |
testcase_06 | AC | 488 ms
43,824 KB |
testcase_07 | AC | 492 ms
44,096 KB |
testcase_08 | AC | 494 ms
44,088 KB |
testcase_09 | AC | 481 ms
44,352 KB |
testcase_10 | AC | 490 ms
43,964 KB |
testcase_11 | AC | 496 ms
43,964 KB |
testcase_12 | AC | 493 ms
44,348 KB |
testcase_13 | AC | 500 ms
43,964 KB |
testcase_14 | AC | 503 ms
43,708 KB |
testcase_15 | AC | 508 ms
43,832 KB |
testcase_16 | AC | 503 ms
43,964 KB |
testcase_17 | AC | 506 ms
44,348 KB |
testcase_18 | AC | 506 ms
44,036 KB |
testcase_19 | AC | 494 ms
44,084 KB |
testcase_20 | AC | 509 ms
43,840 KB |
testcase_21 | AC | 499 ms
43,956 KB |
testcase_22 | AC | 502 ms
43,960 KB |
testcase_23 | AC | 499 ms
43,968 KB |
testcase_24 | AC | 504 ms
43,964 KB |
testcase_25 | AC | 495 ms
44,088 KB |
testcase_26 | AC | 506 ms
44,220 KB |
testcase_27 | AC | 506 ms
43,844 KB |
testcase_28 | AC | 497 ms
43,964 KB |
testcase_29 | AC | 502 ms
43,832 KB |
testcase_30 | AC | 513 ms
43,968 KB |
testcase_31 | AC | 508 ms
43,972 KB |
testcase_32 | AC | 500 ms
44,216 KB |
testcase_33 | AC | 498 ms
44,216 KB |
testcase_34 | AC | 496 ms
44,224 KB |
testcase_35 | AC | 500 ms
43,836 KB |
testcase_36 | AC | 489 ms
43,840 KB |
testcase_37 | AC | 501 ms
43,840 KB |
testcase_38 | AC | 498 ms
43,960 KB |
testcase_39 | AC | 493 ms
43,964 KB |
testcase_40 | AC | 494 ms
44,224 KB |
testcase_41 | AC | 483 ms
43,956 KB |
testcase_42 | AC | 482 ms
43,800 KB |
testcase_43 | AC | 486 ms
43,964 KB |
testcase_44 | AC | 493 ms
43,964 KB |
testcase_45 | AC | 484 ms
44,216 KB |
testcase_46 | AC | 491 ms
43,960 KB |
testcase_47 | AC | 497 ms
43,836 KB |
testcase_48 | AC | 490 ms
43,968 KB |
testcase_49 | AC | 491 ms
44,100 KB |
testcase_50 | AC | 508 ms
43,836 KB |
testcase_51 | AC | 509 ms
43,840 KB |
testcase_52 | AC | 498 ms
43,932 KB |
testcase_53 | AC | 552 ms
44,612 KB |
testcase_54 | AC | 520 ms
44,216 KB |
testcase_55 | AC | 512 ms
43,968 KB |
testcase_56 | AC | 501 ms
43,956 KB |
testcase_57 | AC | 487 ms
44,220 KB |
testcase_58 | AC | 483 ms
43,968 KB |
testcase_59 | AC | 491 ms
43,956 KB |
testcase_60 | AC | 489 ms
44,216 KB |
testcase_61 | AC | 494 ms
43,964 KB |
testcase_62 | AC | 489 ms
44,216 KB |
testcase_63 | AC | 487 ms
43,832 KB |
testcase_64 | AC | 503 ms
43,960 KB |
testcase_65 | AC | 508 ms
44,476 KB |
testcase_66 | AC | 510 ms
44,476 KB |
testcase_67 | AC | 516 ms
44,476 KB |
testcase_68 | AC | 512 ms
44,380 KB |
testcase_69 | AC | 506 ms
44,476 KB |
testcase_70 | AC | 513 ms
44,604 KB |
testcase_71 | AC | 504 ms
44,600 KB |
testcase_72 | AC | 499 ms
44,348 KB |
testcase_73 | AC | 490 ms
44,208 KB |
testcase_74 | AC | 506 ms
43,704 KB |
testcase_75 | AC | 502 ms
44,200 KB |
testcase_76 | AC | 496 ms
43,708 KB |
testcase_77 | AC | 508 ms
44,344 KB |
testcase_78 | AC | 482 ms
44,344 KB |
testcase_79 | AC | 495 ms
44,092 KB |
testcase_80 | AC | 500 ms
43,964 KB |
testcase_81 | AC | 489 ms
44,344 KB |
testcase_82 | AC | 503 ms
43,832 KB |
testcase_83 | AC | 494 ms
43,836 KB |
testcase_84 | AC | 510 ms
43,964 KB |
testcase_85 | AC | 503 ms
43,840 KB |
testcase_86 | AC | 515 ms
43,960 KB |
testcase_87 | AC | 500 ms
43,828 KB |
ソースコード
#!/usr/bin/ python3.8 import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np H, W = map(int, readline().split()) A = np.frombuffer(read(), 'S1').reshape(H, -1)[:, :W].astype(int) def solve(A): H, W = A.shape if H == 1 and W == 1: return A[0, 0] == 1 is_monotone_col = np.isin(np.sum(A, axis=0), [0, H]) is_monotone_row = np.isin(np.sum(A, axis=1), [0, W]) return not (np.any(is_monotone_col) and np.any(is_monotone_row)) print('YES' if solve(A) else 'NO')