結果

問題 No.2279 OR Insertion
ユーザー 👑 p-adicp-adic
提出日時 2023-07-16 12:33:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 253 bytes
コンパイル時間 1,944 ms
コンパイル使用メモリ 81,552 KB
実行使用メモリ 201,368 KB
最終ジャッジ日時 2023-10-17 14:57:46
合計ジャッジ時間 70,291 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 TLE -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 TLE -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 TLE -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 36 ms
53,456 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 36 ms
53,456 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 TLE -
testcase_33 TLE -
testcase_34 TLE -
testcase_35 TLE -
testcase_36 TLE -
testcase_37 TLE -
testcase_38 TLE -
testcase_39 TLE -
testcase_40 TLE -
testcase_41 TLE -
testcase_42 TLE -
testcase_43 TLE -
testcase_44 TLE -
testcase_45 TLE -
testcase_46 TLE -
testcase_47 TLE -
testcase_48 TLE -
testcase_49 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R=input,range
N=int(I())
M=R(N)
A=[[0]*N for i in R(N+1)]
B=[0]*N
S=I()
P=998244353
for i in R(1,N+1):
	s=S[N-i]>"0"
	for j in R(i):
		B[j]+=(S[N-i]>"0")*(pow(2,max(0,i-j-1-1),P)-A[i-j-1][j])
		A[i][j]=B[j]%P
print(sum(pow(2,j,P)*A[N][j]for j in M)%P)
0