結果
問題 | No.2270 T0空間 |
ユーザー | MasKoaTS |
提出日時 | 2023-02-22 19:02:26 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,076 bytes |
コンパイル時間 | 1,719 ms |
コンパイル使用メモリ | 85,696 KB |
実行使用メモリ | 111,520 KB |
最終ジャッジ日時 | 2023-09-30 02:08:15 |
合計ジャッジ時間 | 13,878 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 273 ms
81,676 KB |
testcase_01 | AC | 231 ms
81,056 KB |
testcase_02 | AC | 229 ms
80,456 KB |
testcase_03 | AC | 230 ms
80,588 KB |
testcase_04 | AC | 232 ms
81,140 KB |
testcase_05 | AC | 228 ms
81,068 KB |
testcase_06 | AC | 231 ms
80,484 KB |
testcase_07 | AC | 232 ms
80,648 KB |
testcase_08 | AC | 229 ms
80,936 KB |
testcase_09 | AC | 234 ms
80,900 KB |
testcase_10 | WA | - |
testcase_11 | AC | 373 ms
93,912 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 801 ms
104,304 KB |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | TLE | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
ソースコード
import itertools as iter import collections as coll import heapq as hq import bisect as bis from decimal import Decimal as dec from functools import cmp_to_key import math import sys #import pypyjit #pypyjit.set_param('max_unroll_recursion=-1') sys.setrecursionlimit(10 ** 6) inp = sys.stdin.readline input = lambda : inp().rstrip() getN = lambda : int(inp()) getNs = lambda : map(int, inp().split()) getList = lambda :list(map(int, inp().split())) getStrs = lambda n : [input() for _ in [0] * n] def yexit(): print("Yes"); exit(0) def nexit(): print("No"); exit(0) pi = 3.141592653589793 mod = 1000000007 MOD = 998244353 INF = 4611686018427387903 dx = [1, 0, -1, 0]; dy = [0, 1, 0, -1] #di = coll.defaultdict(int) """ Main Code """ n = getN() m = getN() s = getStrs(m) st = set([]) for ss in s: t = 0 for i, c in enumerate(ss[::-1]): t |= int(c) << i st.add(t) for i in range(n): a = 1 b = 0 for k in st: if((k >> i) & 1): a &= k else: b |= k for j in range(n): if(i == j): continue if((a >> j) & 1 and ((b >> j) & 1) == 0): nexit() yexit()