結果
問題 | No.2451 Redistribute Integers |
ユーザー | 👑 獅子座じゃない人 |
提出日時 | 2023-09-01 21:26:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 216 ms / 2,000 ms |
コード長 | 338 bytes |
コンパイル時間 | 1,657 ms |
コンパイル使用メモリ | 167,560 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-11 10:58:40 |
合計ジャッジ時間 | 4,301 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { int n; cin >> n; vector<int> a(n); for(int i=0;i<n;++i){ cin >> a[i]; } bool ans=true; for(int i=0;i<n;++i){ if(abs(a[i]-a[0])%n){ ans=false; } } cout << ( ans ? "Yes" : "No" ) << endl; return 0; }