結果

問題 No.216 FAC
コンテスト
ユーザー furafy
提出日時 2015-05-27 03:51:24
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 548 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 404 ms
コンパイル使用メモリ 75,896 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-03-27 23:26:29
合計ジャッジ時間 1,200 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>

using namespace std;

int main(void) {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int N;
  int pK = 0;
  int pO = 0;
  int cnt = 0;
  cin >> N;
  vector<int> point(N);
  vector<int> man(N);
  while (cnt < 2) {
    for (int i = 0; i < N; i++) {
      int n;
      cin >> n;
      if (cnt == 0) {
        point[i] = n;
      } else {
        if (n == 0)
          pK += point[i];
        else
          pO += point[i];
      }
    }
    cnt++;
  }
  cout << ((pK >= pO) ? "YES" : "NO") << endl;
}
0