結果

問題 No.2592 おでぶなおばけさん 2
ユーザー 👑 p-adicp-adic
提出日時 2023-12-21 01:11:40
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 594 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 95,680 KB
最終ジャッジ日時 2023-12-21 01:14:33
合計ジャッジ時間 163,915 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 160 ms
81,072 KB
testcase_02 AC 460 ms
80,384 KB
testcase_03 AC 270 ms
77,136 KB
testcase_04 AC 369 ms
77,024 KB
testcase_05 AC 351 ms
91,336 KB
testcase_06 AC 758 ms
79,956 KB
testcase_07 AC 678 ms
79,744 KB
testcase_08 AC 779 ms
83,852 KB
testcase_09 AC 389 ms
78,980 KB
testcase_10 AC 562 ms
78,268 KB
testcase_11 AC 694 ms
83,904 KB
testcase_12 AC 217 ms
77,380 KB
testcase_13 AC 1,977 ms
85,904 KB
testcase_14 AC 2,006 ms
86,216 KB
testcase_15 AC 1,889 ms
82,000 KB
testcase_16 AC 2,005 ms
86,200 KB
testcase_17 AC 2,047 ms
88,768 KB
testcase_18 AC 1,901 ms
82,160 KB
testcase_19 AC 1,853 ms
80,936 KB
testcase_20 AC 809 ms
80,796 KB
testcase_21 AC 823 ms
77,976 KB
testcase_22 AC 848 ms
83,920 KB
testcase_23 AC 2,200 ms
90,884 KB
testcase_24 AC 2,096 ms
84,452 KB
testcase_25 AC 1,734 ms
81,136 KB
testcase_26 AC 1,826 ms
81,248 KB
testcase_27 TLE -
testcase_28 AC 2,490 ms
92,344 KB
testcase_29 AC 2,379 ms
92,380 KB
testcase_30 AC 2,436 ms
92,380 KB
testcase_31 AC 2,432 ms
92,488 KB
testcase_32 AC 2,472 ms
92,488 KB
testcase_33 AC 2,474 ms
92,360 KB
testcase_34 AC 2,317 ms
95,520 KB
testcase_35 AC 2,347 ms
95,520 KB
testcase_36 AC 2,341 ms
95,520 KB
testcase_37 AC 2,399 ms
95,552 KB
testcase_38 AC 2,419 ms
95,648 KB
testcase_39 AC 2,330 ms
95,520 KB
testcase_40 AC 2,281 ms
95,520 KB
testcase_41 AC 2,451 ms
95,648 KB
testcase_42 AC 2,325 ms
95,520 KB
testcase_43 AC 2,318 ms
95,520 KB
testcase_44 AC 2,243 ms
95,520 KB
testcase_45 AC 2,359 ms
95,552 KB
testcase_46 AC 2,282 ms
95,520 KB
testcase_47 AC 2,104 ms
91,304 KB
testcase_48 AC 2,186 ms
91,304 KB
testcase_49 AC 2,159 ms
91,304 KB
testcase_50 AC 2,157 ms
91,304 KB
testcase_51 AC 2,117 ms
91,304 KB
testcase_52 AC 2,362 ms
95,648 KB
testcase_53 AC 2,287 ms
95,520 KB
testcase_54 AC 2,401 ms
95,520 KB
testcase_55 AC 2,382 ms
95,648 KB
testcase_56 AC 2,301 ms
95,520 KB
testcase_57 AC 116 ms
91,176 KB
testcase_58 TLE -
testcase_59 WA -
testcase_60 AC 2,465 ms
92,344 KB
testcase_61 WA -
testcase_62 TLE -
testcase_63 WA -
testcase_64 WA -
testcase_65 TLE -
testcase_66 WA -
testcase_67 AC 2,001 ms
92,908 KB
testcase_68 AC 2,203 ms
93,292 KB
testcase_69 AC 1,972 ms
92,908 KB
testcase_70 AC 2,295 ms
93,292 KB
testcase_71 AC 2,119 ms
92,792 KB
testcase_72 AC 2,302 ms
93,292 KB
testcase_73 AC 2,247 ms
93,292 KB
testcase_74 AC 38 ms
53,460 KB
testcase_75 AC 2,374 ms
95,520 KB
testcase_76 TLE -
testcase_77 AC 2,425 ms
95,680 KB
testcase_78 AC 2,373 ms
95,648 KB
testcase_79 AC 2,199 ms
95,520 KB
testcase_80 AC 2,329 ms
95,680 KB
testcase_81 AC 2,447 ms
95,680 KB
testcase_82 AC 2,295 ms
95,520 KB
testcase_83 AC 2,294 ms
95,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

B=13
R=range
J=lambda:map(int,input().split())
N,Q,K=J()
A=list(J())
while N%B:
	A+=[0]
	N+=1
N//=B
def Add(i,t,F):
	i+=1
	while i<=N:F[i],i=F[i]+t,i+(i&-i)
def InitialSum(r,F):
	a=0
	i=min(r+1,N)
	while i:a,i=a+F[i],i-(i&-i)
	return a
def IntervalSum(l,r,F):
	return InitialSum(r,F)-InitialSum(l-1,F)
bit=[[0]*(N+1)for i in R(B)]
for i in R(B):
	for j in R(N):Add(j,A[j*B+i],bit[i])
for q in R(Q):
	l,r=J()
	k=K
	l,t,p,M=l-1,0,1,pow(k,B)-1
	for i in R(B):
		x,y=l//B,(r-1)//B
		if l>x*B+i:x+=1
		if y*B+i>r-1:y-=1
		t,p=t+(0if x>y else IntervalSum(x,y,bit[i])*p),p*k
	print("YNeos"[t%M==0::2])
0