結果
問題 | No.970 数列変換マシン |
ユーザー | tekihei2317 |
提出日時 | 2020-01-17 21:28:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 278 bytes |
コンパイル時間 | 1,676 ms |
コンパイル使用メモリ | 168,748 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-25 18:38:02 |
合計ジャッジ時間 | 2,916 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Lint=long long; int main() { int N; cin>>N; vector<int> y(N); for(int i=0;i<N;i++) cin>>y[i]; int S=accumulate(y.begin(),y.end(),0); for(int i=0;i<N;i++) cout<<S-(N-1)*y[i]<<(i==N-1? '\n':' '); return 0; }