結果

問題 No.2369 Some Products
ユーザー 沙耶花沙耶花
提出日時 2023-06-30 23:01:38
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 652 bytes
コンパイル時間 4,324 ms
コンパイル使用メモリ 271,764 KB
実行使用メモリ 8,764 KB
最終ジャッジ日時 2023-09-21 17:18:06
合計ジャッジ時間 8,314 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,764 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 4000000000000000001

vector<mint> op(vector<mint> a,vector<mint> b){
	return convolution(a,b);
}
vector<mint> e(){
	return {1};
}
int main(){
	
	int n;
	cin>>n;
	vector<vector<mint>> p(n);
	rep(i,n){
		int t;
		cin>>t;
		p[i] = {1,t};
	}
	segtree<vector<mint>,op,e> seg(p);//0;
	
	
	int q;
	cin>>q;
	rep(_,q){
		int a,b,k;
		cin>>a>>b>>k;
		auto r = seg.prod(a-1,b);
		cout<<r[k].val()<<endl;
	}
		
	
		
	
    return 0;
}

0