結果

問題 No.2592 おでぶなおばけさん 2
ユーザー 👑 p-adicp-adic
提出日時 2023-12-21 00:50:47
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 665 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 99,076 KB
最終ジャッジ日時 2023-12-21 00:51:38
合計ジャッジ時間 48,389 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
56,280 KB
testcase_01 AC 178 ms
81,968 KB
testcase_02 AC 491 ms
81,064 KB
testcase_03 AC 273 ms
77,948 KB
testcase_04 AC 376 ms
78,500 KB
testcase_05 AC 381 ms
92,128 KB
testcase_06 AC 803 ms
80,752 KB
testcase_07 AC 824 ms
80,520 KB
testcase_08 AC 846 ms
84,612 KB
testcase_09 AC 413 ms
79,560 KB
testcase_10 AC 597 ms
78,324 KB
testcase_11 AC 738 ms
84,672 KB
testcase_12 AC 226 ms
78,344 KB
testcase_13 AC 2,043 ms
86,628 KB
testcase_14 AC 2,272 ms
86,696 KB
testcase_15 AC 2,023 ms
82,768 KB
testcase_16 AC 2,222 ms
86,680 KB
testcase_17 AC 2,083 ms
89,680 KB
testcase_18 TLE -
testcase_19 AC 1,693 ms
81,360 KB
testcase_20 AC 1,009 ms
81,604 KB
testcase_21 AC 897 ms
79,040 KB
testcase_22 AC 944 ms
84,716 KB
testcase_23 TLE -
testcase_24 TLE -
testcase_25 AC 1,922 ms
81,612 KB
testcase_26 AC 1,696 ms
81,596 KB
testcase_27 AC 2,423 ms
92,108 KB
testcase_28 TLE -
testcase_29 AC 2,489 ms
92,400 KB
testcase_30 TLE -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
testcase_67 -- -
testcase_68 -- -
testcase_69 -- -
testcase_70 -- -
testcase_71 -- -
testcase_72 -- -
testcase_73 -- -
testcase_74 -- -
testcase_75 -- -
testcase_76 -- -
testcase_77 -- -
testcase_78 -- -
testcase_79 -- -
testcase_80 -- -
testcase_81 -- -
testcase_82 -- -
testcase_83 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
import sys
B=random.randrange(12,22)
print(B,file=sys.stderr)
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