結果

問題 No.2451 Redistribute Integers
ユーザー VvyLwVvyLw
提出日時 2023-09-02 01:25:20
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 723 ms
コンパイル使用メモリ 29,056 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-11 11:06:19
合計ジャッジ時間 2,449 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 68 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 54 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 23 ms
5,376 KB
testcase_13 AC 62 ms
5,376 KB
testcase_14 AC 62 ms
5,376 KB
testcase_15 AC 33 ms
5,376 KB
testcase_16 AC 31 ms
5,376 KB
testcase_17 AC 48 ms
5,376 KB
testcase_18 AC 60 ms
5,376 KB
testcase_19 AC 6 ms
5,376 KB
testcase_20 AC 49 ms
5,376 KB
testcase_21 AC 61 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int main(void) {
	int n, i, a[1<<19], ok = 1;
	scanf("%d", &n);
	for(i = 0; i < n; ++i) {
		scanf("%d", &a[i]);
	}
	for(i = 0; i + 1 < n; ++i) {
		ok &= (a[i + 1] - a[i]) % n == 0;
	}
	printf(ok ? "Yes\n" : "No\n");
}
0