結果
| 問題 |
No.3027 f-列とh-列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-21 21:24:41 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 677 bytes |
| コンパイル時間 | 3,831 ms |
| コンパイル使用メモリ | 280,604 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-02-21 21:24:46 |
| 合計ジャッジ時間 | 4,966 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define all(a) begin(a),end(a)
#define sz(a) (int)(a).size()
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
int main(){
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(cin.failbit);
int N;cin>>N;
vector<vector<ll>>binom(30,vector<ll>(30));
binom[0][0]=1;
rep(i,0,29)rep(j,0,i+1){
binom[i+1][j]+=binom[i][j];
binom[i+1][j+1]+=binom[i][j];
}
vector<ll>A(N+1);
rep(i,0,N+1)cin>>A[i];
reverse(all(A));
vector<ll>B(N+1);
rep(i,0,N+1)rep(j,0,i+1){
B[j]+=A[i]*binom[i][j]*((i-j)%2?-1:1);
}
reverse(all(B));
rep(i,0,N+1)cout<<B[i]<<(i==N?"\n":" ");
}