結果

問題 No.669 対決!!! 飲み比べ
ユーザー lllllll88938494lllllll88938494
提出日時 2023-05-08 15:42:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 1,579 ms
コンパイル使用メモリ 86,680 KB
実行使用メモリ 83,328 KB
最終ジャッジ日時 2023-08-16 17:52:10
合計ジャッジ時間 4,699 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,188 KB
testcase_01 AC 92 ms
75,660 KB
testcase_02 AC 75 ms
76,332 KB
testcase_03 AC 71 ms
70,980 KB
testcase_04 AC 71 ms
71,360 KB
testcase_05 AC 74 ms
75,536 KB
testcase_06 AC 77 ms
77,800 KB
testcase_07 AC 72 ms
70,984 KB
testcase_08 AC 76 ms
75,448 KB
testcase_09 AC 75 ms
75,436 KB
testcase_10 AC 79 ms
78,708 KB
testcase_11 AC 82 ms
83,136 KB
testcase_12 AC 70 ms
70,980 KB
testcase_13 AC 74 ms
76,460 KB
testcase_14 AC 76 ms
75,528 KB
testcase_15 AC 78 ms
75,800 KB
testcase_16 AC 74 ms
71,076 KB
testcase_17 AC 72 ms
71,296 KB
testcase_18 AC 73 ms
71,224 KB
testcase_19 AC 75 ms
75,468 KB
testcase_20 AC 74 ms
75,460 KB
testcase_21 AC 73 ms
75,524 KB
testcase_22 AC 71 ms
71,160 KB
testcase_23 AC 81 ms
83,328 KB
testcase_24 AC 70 ms
71,108 KB
testcase_25 AC 70 ms
70,984 KB
testcase_26 AC 72 ms
71,088 KB
testcase_27 AC 71 ms
71,364 KB
testcase_28 AC 74 ms
75,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
a = list(map(int,input().split()))
m=max(a)
g = [0]* (m + 1)

for i in range(1,m+1):
    if g[i-1] == k:
        g[i] = 0
    else:
        g[i] = g[i-1] + 1

cnt = 0
for i in a:
    cnt^=g[i]

print('NO' if cnt == 0 else 'YES')    
0