結果
問題 | No.970 数列変換マシン |
ユーザー |
![]() |
提出日時 | 2020-01-18 10:46:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 37 ms / 2,000 ms |
コード長 | 290 bytes |
コンパイル時間 | 1,500 ms |
コンパイル使用メモリ | 167,560 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 03:23:53 |
合計ジャッジ時間 | 3,421 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;}