結果
問題 |
No.216 FAC
|
ユーザー |
![]() |
提出日時 | 2020-04-16 14:57:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 1,371 ms |
コンパイル使用メモリ | 168,648 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 19:17:49 |
合計ジャッジ時間 | 2,154 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (int &e : a) cin >> e; vector<int> p(101, 0); for (int i = 0; i < n; i++) { int j; cin >> j; p[j] += a[i]; } if (p[0] == *max_element(p.begin(), p.end())) { cout << "YES" << '\n'; } else { cout << "NO" << '\n'; } return 0; }