結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-03 00:15:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 345 bytes |
| コンパイル時間 | 1,576 ms |
| コンパイル使用メモリ | 169,188 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-24 20:06:54 |
| 合計ジャッジ時間 | 2,579 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
typedef long long ll;
int main(){
int n; cin>>n;
vector<int> a(n);
rep(i,n) cin>>a[i];
vector<int> p(101,0);
rep(i,n){
int j; cin>>j;
p[j]+=a[i];
}
if(p[0] == *max_element(p.begin(), p.end())) cout << "YES" << endl;
else cout << "NO" << endl;
}