結果
| 問題 |
No.970 数列変換マシン
|
| コンテスト | |
| ユーザー |
mighty-isuka
|
| 提出日時 | 2020-01-24 13:27:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 2,000 ms |
| コード長 | 326 bytes |
| コンパイル時間 | 1,740 ms |
| コンパイル使用メモリ | 169,576 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-14 03:09:38 |
| 合計ジャッジ時間 | 3,257 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#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-1]<<endl;
}
mighty-isuka