結果

問題 No.2282 Boxed Nim
ユーザー mono_0812mono_0812
提出日時 2023-04-28 21:32:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 2,356 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 23,240 KB
最終ジャッジ日時 2024-04-28 23:12:58
合計ジャッジ時間 2,781 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
12,288 KB
testcase_01 AC 43 ms
12,160 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 43 ms
12,288 KB
testcase_06 WA -
testcase_07 AC 43 ms
12,288 KB
testcase_08 AC 43 ms
12,160 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 83 ms
15,544 KB
testcase_15 AC 86 ms
15,104 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 99 ms
23,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

############################################################################################
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
 
    if temp!=1:
        arr.append([temp, 1])
 
    if arr==[]:
        arr.append([n, 1])
 
    return arr
def cycle_detection(f, x0):
 
    power = lam = 1
    first = x0
    second = f(x0)
    while first != second:
        if power == lam:
            first = second
            power *= 2
            lam = 0
        second = f(second)
        lam += 1
    first = second = x0
    for i in range(lam):
        second = f(second)
    mu = 0
    while first != second:
        first = f(first)
        second = f(second)
        mu += 1
    return mu, lam
def cycle_detection_lists(f, x0):
    mu, lam = cycle_detection(f, x0)
    before_cycle = [0] * mu
    if mu > 0:
        before_cycle[0] = x0
        for i in range(mu - 1):
            before_cycle[i + 1] = f(before_cycle[i])
 
    cycle = [0] * lam
    cycle[0] = before_cycle[-1] if mu > 0 else x0
    for i in range(lam - 1):
        cycle[i + 1] = f(cycle[i])
    return before_cycle, cycle
 
import bisect,collections,copy,heapq,itertools,math,string,sys,queue,time,random
from decimal import Decimal
def I(): return input()
def IS(): return input().split()
def II(): return int(input())
def IIS(): return list(map(int,input().split()))
def LIIS(): return list(map(int,input().split()))
def comb(n, r):return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
 
INF=1<<63
MOD=998244353
MOD2=10**9+7
#sys.setrecursionlimit(10**7)
alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def bit_count(x):
    return bin(x).count("1")
def yesno(f):
    if f:print("Yes")
    else:print("No")
 
 
####################################################
n=II()
A=LIIS()
for i in range(1,n):
    A[0]^=A[i]
A[0]^=n%2
if A[0]==0:
    print("Second")
else:
    print("First")
0