結果

問題 No.669 対決!!! 飲み比べ
ユーザー buey_tbuey_t
提出日時 2023-04-27 13:11:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 222 ms / 2,000 ms
コード長 1,615 bytes
コンパイル時間 1,113 ms
コンパイル使用メモリ 86,892 KB
実行使用メモリ 82,656 KB
最終ジャッジ日時 2023-08-10 13:56:59
合計ジャッジ時間 8,962 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 218 ms
82,520 KB
testcase_01 AC 216 ms
82,576 KB
testcase_02 AC 218 ms
82,364 KB
testcase_03 AC 218 ms
82,568 KB
testcase_04 AC 220 ms
82,436 KB
testcase_05 AC 220 ms
82,504 KB
testcase_06 AC 214 ms
82,396 KB
testcase_07 AC 220 ms
82,504 KB
testcase_08 AC 221 ms
82,396 KB
testcase_09 AC 220 ms
82,392 KB
testcase_10 AC 213 ms
82,396 KB
testcase_11 AC 221 ms
82,288 KB
testcase_12 AC 215 ms
82,568 KB
testcase_13 AC 220 ms
82,284 KB
testcase_14 AC 217 ms
82,568 KB
testcase_15 AC 218 ms
82,420 KB
testcase_16 AC 217 ms
82,248 KB
testcase_17 AC 217 ms
82,388 KB
testcase_18 AC 219 ms
82,396 KB
testcase_19 AC 219 ms
82,552 KB
testcase_20 AC 222 ms
82,360 KB
testcase_21 AC 218 ms
82,624 KB
testcase_22 AC 220 ms
82,368 KB
testcase_23 AC 219 ms
82,580 KB
testcase_24 AC 218 ms
82,284 KB
testcase_25 AC 217 ms
82,416 KB
testcase_26 AC 220 ms
82,356 KB
testcase_27 AC 218 ms
82,656 KB
testcase_28 AC 215 ms
82,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum
from heapq import heapify, heappop, heappush
from bisect import bisect_left, bisect_right
from copy import deepcopy
import copy
import random
from random import randrange
from collections import deque,Counter,defaultdict
from itertools import permutations,combinations
from decimal import Decimal,ROUND_HALF_UP
#tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
from functools import lru_cache, reduce
#@lru_cache(maxsize=None)
from operator import add,sub,mul,xor,and_,or_,itemgetter
import sys
input = sys.stdin.readline
# .rstrip()
INF = 10**18
mod1 = 10**9+7
mod2 = 998244353

#DecimalならPython
#再帰ならPython!!!!!!!!!!!!!!!!!!!!!!!!!!


'''
任意の数だけ飲めるわけじゃないのか
グランディ数だな
任意の数飲めれば二ム和、飲めなければグランディ数
Kが小さいから、前計算できる
いや、飲める量は区間をもってるからグランディ数前計算はきついんじゃ
O(10^6*K)になるような
ここを工夫しないといけない
Mexを高速に処理できればいいから
mapで、出てきたやつを消せばいい
それで、0に近いやつ
ただ、グランディ数って連続性あるよな
一個飛んだりはしない
下には飛ぶか
規則性ありそう
012..K 012..K ..ってなりそう
A%(K+1)
'''

N,K = map(int, input().split())
A = list(map(int, input().split()))

x = A[0]%(K+1)
for i in range(1,N):
    x ^= A[i]%(K+1)

if x == 0:
    print('NO')
else:
    print('YES')























0