結果
問題 | No.216 FAC |
ユーザー |
|
提出日時 | 2020-06-23 19:41:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 47 ms / 1,000 ms |
コード長 | 348 bytes |
コンパイル時間 | 1,843 ms |
コンパイル使用メモリ | 196,784 KB |
最終ジャッジ日時 | 2025-01-11 09:37:30 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include<bits/stdc++.h>using namespace std;int main(){cin.tie(0),ios::sync_with_stdio(false);int n; cin>>n;vector<int>a(n); for(auto&&i:a)cin>>i;vector<int>b(n); for(auto&&i:b)cin>>i;vector<int>sc(101,0);for(int i=0;i<n;++i){sc.at(b.at(i))+=a.at(i);}cout<<(sc.front()>=*max_element(sc.begin(),sc.end())?"YES"s:"NO"s)<<"\n"s;}