結果
| 問題 |
No.1068 #いろいろな色 / Red and Blue and more various colors (Hard)
|
| コンテスト | |
| ユーザー |
FF256grhy
|
| 提出日時 | 2022-01-29 12:55:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 1,290 ms / 3,500 ms |
| コード長 | 265 bytes |
| コンパイル時間 | 4,979 ms |
| コンパイル使用メモリ | 259,960 KB |
| 最終ジャッジ日時 | 2025-01-27 17:48:08 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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(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(v[2*i],v[2*i+1]);F(q)cin>>a,cout<<v[0][a]<<"\n";}
FF256grhy