結果

問題 No.2451 Redistribute Integers
ユーザー eve__fuyukieve__fuyuki
提出日時 2023-09-05 09:38:44
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 2,183 ms
コンパイル使用メモリ 200,264 KB
実行使用メモリ 7,152 KB
最終ジャッジ日時 2023-09-05 09:38:49
合計ジャッジ時間 4,522 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 71 ms
7,152 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 55 ms
6,972 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 25 ms
4,400 KB
testcase_13 AC 65 ms
6,872 KB
testcase_14 AC 70 ms
6,972 KB
testcase_15 AC 36 ms
5,128 KB
testcase_16 AC 33 ms
4,856 KB
testcase_17 AC 52 ms
5,828 KB
testcase_18 AC 65 ms
6,824 KB
testcase_19 AC 6 ms
4,376 KB
testcase_20 AC 55 ms
6,252 KB
testcase_21 AC 69 ms
6,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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");
}
0