結果
問題 |
No.1068 #いろいろな色 / Red and Blue and more various colors (Hard)
|
ユーザー |
![]() |
提出日時 | 2022-01-07 18:43:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1,227 ms / 3,500 ms |
コード長 | 276 bytes |
コンパイル時間 | 4,518 ms |
コンパイル使用メモリ | 261,916 KB |
最終ジャッジ日時 | 2025-01-27 09:02:29 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<bits/stdc++.h> | ^~~~~~ main.cpp:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 2 | #import<atcoder/all> | ^~~~~~ main.cpp:4:21: warning: ISO C++ forbids declaration of ‘main’ with no type [-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";} | ^~~~
ソースコード
#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";}