結果
問題 |
No.970 数列変換マシン
|
ユーザー |
![]() |
提出日時 | 2020-01-24 13:22:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 324 bytes |
コンパイル時間 | 1,604 ms |
コンパイル使用メモリ | 168,576 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 03:02:53 |
合計ジャッジ時間 | 3,542 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 1 WA * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; vector<int>y(N); for(int i=0;i<N;i++)cin>>y[i]; long s=0; for(int i=0;i<N;i++)s+=y[i]; vector<int>x(N); for(int i=0;i<N;i++)x[i]=s-(N-1)*y[i]; for(int i=0;i<N-1;i++)cout<<x[i]<<" "; cout<<x[N]<<endl; }