結果

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

ソースコード

diff #

#include <cstdio>
#define maxn 500000

int n;
int a[maxn + 5];

int main()
{
	scanf("%d", &n);
	for (int i = 1; i <= n; ++i)
		scanf("%d", &a[i]);
	bool ans = true;
	for (int i = 1; i <= n; ++i)
		if ((a[i + 1] - a[i]) % (n - 2) != 0)
			ans = false;
	if (ans)
		puts("Yes");
	else
		puts("No");
	return 0;
}
0