結果
| 問題 |
No.970 数列変換マシン
|
| コンテスト | |
| ユーザー |
どらら
|
| 提出日時 | 2020-01-17 21:34:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 2,000 ms |
| コード長 | 429 bytes |
| コンパイル時間 | 702 ms |
| コンパイル使用メモリ | 70,372 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-25 18:54:03 |
| 合計ジャッジ時間 | 2,170 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <iostream>
#include <vector>
#define ll long long
using namespace std;
int main(){
int N;
cin >> N;
vector<ll> v;
ll sum = 0;
for(int i=0; i<N; i++){
ll a;
cin >> a;
v.push_back(a);
sum += (N-1) * a;
}
sum /= N - 1;
for(int i=0; i<N; i++){
if(i>0) cout << " ";
cout << sum - (N-1) * v[i];
}
cout << endl;
return 0;
}
どらら