結果
| 問題 |
No.1219 Mancala Combo
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-24 09:22:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 400 bytes |
| コンパイル時間 | 1,535 ms |
| コンパイル使用メモリ | 168,076 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-19 06:19:51 |
| 合計ジャッジ時間 | 3,243 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
int a[n + 1];
for (int i = 1; i <= n; ++i) cin >> a[i];
int times = 0;
for (int i = n; i >= 1; --i){
if (a[i] <= i && (a[i] + times)%i==0){
if (a[i] > 0) ++times;
}else{
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}