結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-02-24 10:50:32 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 431µs | |
| コード長 | 513 bytes |
| 記録 | |
| コンパイル時間 | 907 ms |
| コンパイル使用メモリ | 181,996 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-14 07:27:33 |
| 合計ジャッジ時間 | 2,437 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using longlong=long long;
int main(){
std::cin.tie(nullptr);std::cin.sync_with_stdio(false);
int n;std::cin>>n;
std::vector<int>a(n);
for(int i=0;i<n;i++){
std::cin>>a.at(i);
}
std::vector<int>c(101);
for(int i=0;i<n;i++){
int x;std::cin>>x;
c.at(x)+=a.at(i);
}
for(int i=0;i<=100;i++){
if(c.at(0)<c.at(i)){
std::cout<<"NO"<<std::endl;
exit(0);
}
}
std::cout<<"YES"<<std::endl;
}
ngtkana