結果
| 問題 |
No.2451 Redistribute Integers
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-10-05 02:57:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 245 ms / 2,000 ms |
| コード長 | 485 bytes |
| コンパイル時間 | 860 ms |
| コンパイル使用メモリ | 105,916 KB |
| 最終ジャッジ日時 | 2025-02-17 04:21:23 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
ソースコード
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;
int main(){
ll n, a1;
cin >> n;
vector<ll> a(n);
cin >> a[0];
for (int i = 1; i < n; i++){
cin >> a[i];
if (abs(a[i] - a[0])%n != 0){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}
kpinkcat