結果

問題 No.216 FAC
ユーザー furafy
提出日時 2015-05-27 03:47:24
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 547 bytes
コンパイル時間 496 ms
コンパイル使用メモリ 58,996 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-06 10:34:04
合計ジャッジ時間 1,484 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 15 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#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