結果
| 問題 |
No.2451 Redistribute Integers
|
| コンテスト | |
| ユーザー |
hitonanode
|
| 提出日時 | 2023-09-01 23:27:29 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| コード長 | 381 bytes |
| コンパイル時間 | 649 ms |
| コンパイル使用メモリ | 76,672 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-11 11:05:27 |
| 合計ジャッジ時間 | 2,162 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
ソースコード
#include <iostream>
using namespace std;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
int N;
cin >> N;
int last = -1;
for (int i = 0; i < N; ++i) {
int a;
cin >> a;
a = (a % N + N) % N;
if (last == -1) last = a;
if (last != a) {
puts("No");
return 0;
}
}
puts("Yes");
}
hitonanode