結果

問題 No.3066 エリスリトール
ユーザー cielciel
提出日時 2020-04-05 01:10:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 172 ms / 2,000 ms
コード長 13,920 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 82,292 KB
実行使用メモリ 82,156 KB
最終ジャッジ日時 2024-07-03 07:53:24
合計ジャッジ時間 7,551 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
72,596 KB
testcase_01 AC 72 ms
72,860 KB
testcase_02 AC 71 ms
74,204 KB
testcase_03 AC 72 ms
72,760 KB
testcase_04 AC 86 ms
74,908 KB
testcase_05 AC 86 ms
73,004 KB
testcase_06 AC 163 ms
80,288 KB
testcase_07 AC 162 ms
81,336 KB
testcase_08 AC 165 ms
82,156 KB
testcase_09 AC 162 ms
80,020 KB
testcase_10 AC 156 ms
80,264 KB
testcase_11 AC 149 ms
80,460 KB
testcase_12 AC 152 ms
81,892 KB
testcase_13 AC 145 ms
80,188 KB
testcase_14 AC 148 ms
81,896 KB
testcase_15 AC 164 ms
79,984 KB
testcase_16 AC 155 ms
81,204 KB
testcase_17 AC 165 ms
80,128 KB
testcase_18 AC 166 ms
80,192 KB
testcase_19 AC 163 ms
81,204 KB
testcase_20 AC 163 ms
79,956 KB
testcase_21 AC 164 ms
80,008 KB
testcase_22 AC 163 ms
79,860 KB
testcase_23 AC 164 ms
80,232 KB
testcase_24 AC 167 ms
80,480 KB
testcase_25 AC 162 ms
80,244 KB
testcase_26 AC 159 ms
80,020 KB
testcase_27 AC 164 ms
80,292 KB
testcase_28 AC 166 ms
81,364 KB
testcase_29 AC 165 ms
81,836 KB
testcase_30 AC 172 ms
80,124 KB
testcase_31 AC 169 ms
81,340 KB
testcase_32 AC 168 ms
79,936 KB
testcase_33 AC 84 ms
72,732 KB
testcase_34 AC 84 ms
72,420 KB
testcase_35 AC 85 ms
72,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python

import sys
import bz2
import base64

data=bz2.decompress(base64.b85decode("""
LRx4!F+o`-Q&}1ZNX!5L0N?<B;o*QlT`V~RMPgme)VhVt(S;6l0_<k7-I@S9H*UKSM`mYjiZ#ZhcN}&
)H&xKkniIK4I;0m#Muxi}Q7cnwgznu7oahn2sVY)kwWD`k!MfKP?Aetd$d*h2YgWN`Hw`Hk?CCpdTPG
bIt6Le@cHGxlFz$}-aP4uecS4FuajM3Isojd@R4ts-hYIbARYhj9ohK`t&E1Bn)*KznD!W`->2=)b;_
6iBa_kw=mARdh9k{s^U8%OCwiM`r2{cJ1HAEmu>XJ&HsR4mWB@m(#0;Z&rQB%~w|I6bypX_~T&YXUv<
(WMFU<L3<+xMh@#(&LJU-w_`3cI?!yCp^U0qX#TvXEv-PmCcmRJ&1p!w<RTzPH6CU+$`p%SYTJ<_~Hg
`#+^8(oKzGA~qxoGRR6wB#TPMHKQ8ZOEF?r+bFeZW}{<iW~((-nOUP{zqqF?QL5Fn)WKxUR%Q9F64u_
^`Oh5ZKYn}O!A@GGnpfWG4XQPZ**iO@ZA5CxZ7rirg4&O*E$&pFYiKOAkw7H%fyR_Tal%~*?yy{gGS*
Qom3C5G(Xds`&zbeNr8Zq@QmnvycUxVJl$F`@J3#YF%~DroW?RXKO;%8a^#JWaiy#tCK^UF)k2OzsQv
0?Yq<at?m~t7Zv4<8lG+o_7jnkoDrrYTw>ugr~0hOpE+f+>>R$@$(R%Dr!wxi?SK~F7aH_lbYmW;~Dk
%gIN$)#e4>%NY(-tJh53Yyw7rm2;rq>!x4X)TEa7_de=Xc{w>_pKOYrKrl@E2$O=O2VqO7Eac078jW1
30KuWFH#H-J==X7SMx>MK05p3@6JB4t4hqXO5ciB%F~66wB3_9?ByHxwvMqIQ)%&zi$;#ild-y-m|C-
F#>+*O`J9&3w3%p#t&ybk<jI)Ul_4{4=g(G6nYWkC=hnf?EKR0T%3?|}3|q@u?XtYq+-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#MQNQe
YhcXDmg|<|zQg>0!XZTI)$I&n0KB|}X6!Fz@-E)J(K+@96ECBLIU)j(&{C9v9oQ1UVmVkA#7{O>$SoF
W`xhvm@NT45xD!|B3*zc`~_)vH8-=CT$h`z^@^9Sr#Z_QG^Ur)6!$uET$kgr~PCxY=$CF&kZ_o}0lVf
*>cxB1^{AG)dgGamlGl7E_iRDQemFVugUi{tlxKGa{7m)Q>z_3t6-UPqMmJx>>_n%hTn-YoZxT3E?h|
M7PuQ-uiupmdDD
""".replace("\n","")))

def g(n):
	period = 149459
	head = 105351
	return data[n if n<head else head+(n-head)%period]

n,k=map(int,sys.stdin.readline().split())
prev=0
s=0
for _ in range(n):
	a=int(sys.stdin.readline())
	s^=g(a-prev-1)
	prev=a
s^=g(k+1-prev-1)
print('Yes' if s else 'No')
0