結果

問題 No.2442 線形写像
ユーザー MasKoaTSMasKoaTS
提出日時 2023-08-25 21:32:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 966 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 86,828 KB
実行使用メモリ 95,376 KB
最終ジャッジ日時 2023-08-25 21:32:37
合計ジャッジ時間 6,590 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 198 ms
80,916 KB
testcase_01 AC 199 ms
80,776 KB
testcase_02 AC 198 ms
80,644 KB
testcase_03 AC 227 ms
80,832 KB
testcase_04 AC 201 ms
80,940 KB
testcase_05 WA -
testcase_06 AC 201 ms
80,744 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 229 ms
80,716 KB
testcase_10 WA -
testcase_11 AC 204 ms
80,744 KB
testcase_12 AC 204 ms
80,908 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 235 ms
85,256 KB
testcase_16 AC 269 ms
95,376 KB
testcase_17 WA -
testcase_18 AC 247 ms
86,280 KB
testcase_19 AC 249 ms
86,216 KB
testcase_20 AC 272 ms
94,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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()[:-1]
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]
getEdges = lambda n : [[x - 1 for x in getNs()] 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()
a = [getN() for _ in [0] * (1 << n)]

if(a[0] != 0):
    nexit()
for i in range(1, n):
    if(a[i ^ (i - 1)] != a[i] ^ a[i - 1]):
        nexit()
yexit()
0