結果

問題 No.2451 Redistribute Integers
ユーザー anonymously
提出日時 2023-09-01 21:29:21
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 201 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 1,320 ms
コンパイル使用メモリ 168,656 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-11 10:59:37
合計ジャッジ時間 4,194 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
	int n;
	cin >> n;
	vector<int> A(n);
	for(int i=0;i<n;i++)cin >> A.at(i);
	string ans="Yes";
	for(size_t i=1;i<n;i++){
		if((A.at(i)-A.at(0))%n){
			ans="No";
			break;
		}
	}
	cout << ans << endl;
	return 0;
}
0