結果
| 問題 | No.1219 Mancala Combo |
| コンテスト | |
| ユーザー |
ldsyb
|
| 提出日時 | 2020-09-04 22:11:48 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 552 bytes |
| 記録 | |
| コンパイル時間 | 1,173 ms |
| コンパイル使用メモリ | 211,452 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-06-13 09:49:38 |
| 合計ジャッジ時間 | 5,214 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 TLE * 1 -- * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int64_t n;
cin >> n;
vector<int64_t> as(n + 1, 0);
for (int64_t i = 1; i <= n; i++)
{
cin >> as[i];
}
int64_t sum = accumulate(as.begin(), as.end(), int64_t(0));
while (as[0] != sum)
{
bool f = true;
for (int64_t i = 1; i <= n; i++)
{
if (as[i] == i)
{
f = false;
as[i] = 0;
for (int64_t j = i - 1; 0 <= j; j--)
{
as[j]++;
}
break;
}
}
if (f)
{
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
}
ldsyb