結果
問題 | No.216 FAC |
ユーザー |
![]() |
提出日時 | 2020-02-05 21:03:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 630 ms |
コンパイル使用メモリ | 69,888 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-22 23:08:39 |
合計ジャッジ時間 | 1,633 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(void) { int n, b; cin >> n; vector<int> scoreboard(101, 0), a(n); for (int i = 0; i < n; ++i) cin >> a[i]; for (int i = 0; i < n; ++i) { cin >> b; scoreboard[b] += a[i]; } int score_of_k = scoreboard[0]; string ans = "YES"; for (int i = 0; i < 101; ++i) if (score_of_k < scoreboard[i]) ans = "NO"; cout << ans << endl; return 0; }