結果
| 問題 |
No.2451 Redistribute Integers
|
| コンテスト | |
| ユーザー |
eve__fuyuki
|
| 提出日時 | 2023-09-05 09:38:44 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| コード長 | 395 bytes |
| コンパイル時間 | 1,909 ms |
| コンパイル使用メモリ | 194,612 KB |
| 最終ジャッジ日時 | 2025-02-16 18:43:24 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void fast_io() {
ios_base::sync_with_stdio(false);
cin.tie(0);
}
int main() {
fast_io();
int n;
cin >> n;
vector<long long> a(n);
bool ans = true;
for (int i = 0; i < n; i++) {
cin >> a[i];
if ((a[i] - a[0]) % n != 0) {
ans = false;
}
}
cout << (ans ? "Yes\n" : "No\n");
}
eve__fuyuki