結果

問題 No.2451 Redistribute Integers
ユーザー yansi819
提出日時 2024-03-18 09:04:16
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 224 ms / 2,000 ms
コード長 336 bytes
コンパイル時間 3,558 ms
コンパイル使用メモリ 250,156 KB
最終ジャッジ日時 2025-02-20 07:10:47
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;

int main() {
  int N; cin >> N;
  int A; cin >> A;
  for (int i = 1; i < N; i++) {
    int B; cin >> B;
    if ((B - A) % N) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
0