結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
weaken
|
| 提出日時 | 2020-10-03 01:57:42 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 444 bytes |
| コンパイル時間 | 1,999 ms |
| コンパイル使用メモリ | 195,384 KB |
| 最終ジャッジ日時 | 2025-01-15 01:39:32 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 3 RE * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n, 0), b(101, 0);
for(auto &i : a) cin >> i;
for(auto &i : b) cin >> i;
vector<int> scores(n, 0);
for(int i = 0; i < n; ++i) {
scores[b[i]] += a[i];
}
int me = scores.front();
for(int i = 1; i < n; ++i) {
if(me < scores[i]) {
cout << "NO" << '\n';
return 0;
}
}
cout << "YES" << '\n';
return 0;
}
weaken