結果
問題 |
No.216 FAC
|
ユーザー |
|
提出日時 | 2020-04-20 00:38:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 495 bytes |
コンパイル時間 | 1,662 ms |
コンパイル使用メモリ | 168,064 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-06 08:19:26 |
合計ジャッジ時間 | 2,354 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 8 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using ll = long long; using namespace std; const int INF = 1e9; int main() { int n; cin >> n; vector<int> p(n); rep(i, n) cin >> p[i]; int asum = 0, bsum = 0; rep(i,n){ int a; cin >> a; if(a==0) asum += p[i]; else bsum += p[i]; } if(asum>=bsum) cout << "YES"; else cout << "NO"; cout << endl; return 0; }