結果

問題 No.2451 Redistribute Integers
ユーザー srjywrdnprkt
提出日時 2023-06-21 13:25:56
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 231 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 1,836 ms
コンパイル使用メモリ 191,584 KB
最終ジャッジ日時 2025-02-14 23:47:27
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main(){

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