結果

問題 No.1068 #いろいろな色 / Red and Blue and more various colors (Hard)
ユーザー keijakkeijak
提出日時 2022-01-01 17:25:51
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 390 bytes
コンパイル時間 4,618 ms
コンパイル使用メモリ 265,020 KB
実行使用メモリ 814,464 KB
最終ジャッジ日時 2024-04-18 15:14:29
合計ジャッジ時間 12,859 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1,512 ms
70,912 KB
testcase_04 AC 573 ms
29,312 KB
testcase_05 AC 712 ms
32,896 KB
testcase_06 AC 498 ms
25,216 KB
testcase_07 AC 428 ms
22,912 KB
testcase_08 AC 609 ms
30,976 KB
testcase_09 AC 713 ms
35,200 KB
testcase_10 AC 145 ms
10,240 KB
testcase_11 AC 411 ms
22,144 KB
testcase_12 AC 125 ms
9,344 KB
testcase_13 MLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using V=vector<atcoder::modint998244353>;
int main(){
 int N,Q;cin>>N>>Q;deque<V>q;
 for (long long i=0,a;i<N;++i)cin>>a,q.push_back(V{a-1,1});
 while(q.size()>1)q.push_back(atcoder::convolution(q[0],q[1])),q.back().resize(N+1),q.pop_front(),q.pop_front();
 for (int i=0,b;i<Q;++i)cin>>b,cout<<q.front()[b].val()<<'\n';
}
0