結果
問題 | No.216 FAC |
ユーザー |
![]() |
提出日時 | 2015-05-26 22:22:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 661 bytes |
コンパイル時間 | 1,326 ms |
コンパイル使用メモリ | 157,656 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 09:14:38 |
合計ジャッジ時間 | 2,256 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 8 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int (i) = 0; (i) < (int)(n); (i)++) const int dx[] = {1, 0, -1, 0}; const int dy[] = {0, 1, 0, -1}; using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int, int> pii; int a[111], b[111]; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; int p = 0, q = 0; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; i++) { cin >> b[i]; if (b[i]) q += a[i]; else p += a[i]; } if (p >= q) cout << "YES" << endl; else cout << "NO" << endl; return 0; }