結果
| 問題 | No.3220 Forest Creation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-08-01 21:51:02 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 454 bytes |
| 記録 | |
| コンパイル時間 | 1,061 ms |
| コンパイル使用メモリ | 209,192 KB |
| 実行使用メモリ | 9,348 KB |
| 最終ジャッジ日時 | 2026-07-13 16:50:45 |
| 合計ジャッジ時間 | 3,290 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 43 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
const int N = 2000086, MOD = 1e9 + 7, INF = 0x3f3f3f3f;
__int128_t res;
int n, m, cnt, w[N];
int main() {
cin >> n;
for (int i = 0; i < n + 1; i++) scanf("%d", w + i);
ll sum = 0;
for (int i = 1; i < n + 1; i++) res -= w[i] * (ll)i, sum += w[i];
res += (sum - 1) << 1;
puts(res >= 0 && res % 2 == 0 ? "Yes" : "No");
return 0;
}