結果
問題 | No.923 オセロきりきざむたん |
ユーザー |
![]() |
提出日時 | 2019-11-08 21:59:31 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 862 ms / 2,000 ms |
コード長 | 708 bytes |
コンパイル時間 | 122 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 54,756 KB |
最終ジャッジ日時 | 2024-09-15 02:51:30 |
合計ジャッジ時間 | 52,077 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 84 |
ソースコード
from collections import defaultdict,deque import sys,heapq,bisect,math,itertools,string,queue,copy,time sys.setrecursionlimit(10**8) INF = float('inf') mod = 10**9+7 eps = 10**-7 def inp(): return int(sys.stdin.readline()) def inpl(): return list(map(int, sys.stdin.readline().split())) def inpl_str(): return list(sys.stdin.readline().split()) import numpy as np H,W = inpl() AA = np.array([list(map(int,list(input()))) for _ in range(H)]) for x in range(W): tmp = sum(AA[:, x]) if tmp == H or tmp == 0: break else: print("YES") sys.exit() for y in range(H): tmp = sum(AA[y, :]) if tmp == W or tmp == 0: break else: print("YES") sys.exit() print("NO")