結果

問題 No.1363 [Zelkova Last Tune] 誰がその最後のベルを鳴らすのか?
ユーザー chineristACchineristAC
提出日時 2021-01-22 23:47:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 514 bytes
コンパイル時間 1,461 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 78,408 KB
最終ジャッジ日時 2023-08-28 12:09:51
合計ジャッジ時間 2,293 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,364 KB
testcase_01 AC 132 ms
77,600 KB
testcase_02 AC 176 ms
78,408 KB
testcase_03 AC 71 ms
71,072 KB
testcase_04 AC 70 ms
71,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.readline

ans = []
for _ in range(int(input())):
    N,X,Y = map(int,input().split())
    A = list(map(int,input().split()))
    P = list(map(int,input().split()))

    grundy = 0
    for i in range(N):
        tmp = A[i]%(P[i]+1)
        grundy ^= tmp

    if grundy:
        if Y-grundy-X>=0:
            ans.append("C")
        else:
            ans.append("Z")
    else:
        if Y>=X:
            ans.append("C")
        else:
            ans.append("Z")

print(*ans,sep="\n")
0