結果

問題 No.1068 #いろいろな色 / Red and Blue and more various colors (Hard)
ユーザー FF256grhyFF256grhy
提出日時 2022-01-07 18:43:10
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 1,191 ms / 3,500 ms
コード長 276 bytes
コンパイル時間 4,593 ms
コンパイル使用メモリ 270,008 KB
実行使用メモリ 32,480 KB
最終ジャッジ日時 2023-08-08 23:42:16
合計ジャッジ時間 31,998 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 284 ms
17,416 KB
testcase_01 AC 283 ms
17,720 KB
testcase_02 AC 282 ms
17,756 KB
testcase_03 AC 296 ms
17,884 KB
testcase_04 AC 294 ms
17,604 KB
testcase_05 AC 293 ms
17,972 KB
testcase_06 AC 293 ms
17,604 KB
testcase_07 AC 290 ms
17,728 KB
testcase_08 AC 292 ms
17,448 KB
testcase_09 AC 291 ms
17,456 KB
testcase_10 AC 288 ms
17,904 KB
testcase_11 AC 289 ms
17,620 KB
testcase_12 AC 287 ms
17,584 KB
testcase_13 AC 1,170 ms
32,176 KB
testcase_14 AC 1,182 ms
32,140 KB
testcase_15 AC 1,169 ms
32,168 KB
testcase_16 AC 1,177 ms
32,480 KB
testcase_17 AC 1,191 ms
32,296 KB
testcase_18 AC 1,187 ms
32,176 KB
testcase_19 AC 1,182 ms
32,176 KB
testcase_20 AC 1,186 ms
32,264 KB
testcase_21 AC 1,184 ms
32,136 KB
testcase_22 AC 1,185 ms
32,176 KB
testcase_23 AC 1,186 ms
32,180 KB
testcase_24 AC 1,189 ms
32,176 KB
testcase_25 AC 1,175 ms
32,476 KB
testcase_26 AC 1,166 ms
32,176 KB
testcase_27 AC 1,182 ms
32,152 KB
testcase_28 AC 1,187 ms
32,176 KB
testcase_29 AC 1,136 ms
32,176 KB
testcase_30 AC 1,131 ms
32,480 KB
testcase_31 AC 286 ms
17,456 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: 警告: #import は廃止された GCC 拡張です [-Wdeprecated]
    1 | #import<bits/stdc++.h>
      |  ^~~~~~
main.cpp:2:2: 警告: #import は廃止された GCC 拡張です [-Wdeprecated]
    2 | #import<atcoder/all>
      |  ^~~~~~
main.cpp:4:21: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    4 | using namespace std;main(){long n,q,a;cin>>n>>q;vector v(1<<18,vector{1LL});F(n)cin>>a,v[i]={a-1,1};F(18)F(1<<17)v[i]=atcoder::convolution<998244353>(v[2*i],v[2*i+1]);F(q)cin>>a,cout<<v[0][a]<<"\n";}
      |                     ^~~~

ソースコード

diff #

#import<bits/stdc++.h>
#import<atcoder/all>
#define F(n)for(int i=0;i<n;i++)
using namespace std;main(){long n,q,a;cin>>n>>q;vector v(1<<18,vector{1LL});F(n)cin>>a,v[i]={a-1,1};F(18)F(1<<17)v[i]=atcoder::convolution<998244353>(v[2*i],v[2*i+1]);F(q)cin>>a,cout<<v[0][a]<<"\n";}
0