結果
| 問題 |
No.2451 Redistribute Integers
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-01 21:25:30 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 66 ms / 2,000 ms |
| コード長 | 878 bytes |
| コンパイル時間 | 3,738 ms |
| コンパイル使用メモリ | 356,636 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-11 10:58:02 |
| 合計ジャッジ時間 | 5,487 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
#include <x86intrin.h>
using namespace std;
using namespace numbers;
int main(){
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(ios::badbit | ios::failbit);
int n;
cin >> n;
vector<int> a(n);
copy_n(istream_iterator<int>(cin), n, a.begin());
for(auto i = 1; i < n; ++ i){
if((a[i] % n + n) % n != (a[0] % n + n) % n){
cout << "No\n";
return 0;
}
}
cout << "Yes\n";
return 0;
}
/*
*/
////////////////////////////////////////////////////////////////////////////////////////
// //
// Coded by Aeren //
// //
////////////////////////////////////////////////////////////////////////////////////////