結果
| 問題 |
No.970 数列変換マシン
|
| コンテスト | |
| ユーザー |
CELICA
|
| 提出日時 | 2020-09-02 05:36:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 19 ms / 2,000 ms |
| コード長 | 449 bytes |
| コンパイル時間 | 1,700 ms |
| コンパイル使用メモリ | 171,808 KB |
| 実行使用メモリ | 6,904 KB |
| 最終ジャッジ日時 | 2024-11-21 13:49:47 |
| 合計ジャッジ時間 | 3,213 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ul = unsigned long;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<ll> y(n);
ll sum{ 0 };
for (auto&& iy : y)
{
cin >> iy;
sum += iy;
}
stringstream ss;
for (int i = 0; i < n; ++i)
ss << sum - y[i] * (n - 1) << " ";
string res = ss.str();
res = res.substr(0, res.size() - 1);
cout << res << "\n";
return 0;
}
CELICA