結果
問題 |
No.216 FAC
|
ユーザー |
|
提出日時 | 2016-12-21 20:33:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 652 ms |
コンパイル使用メモリ | 66,340 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-14 13:59:42 |
合計ジャッジ時間 | 1,680 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 2 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~
ソースコード
#include<iostream> #include<algorithm> using namespace std; main(){ int p[101]={},n,a[100],b[100];cin>>n; for(int i=0;i<n;i++)cin>>a[i]; for(int i=0;i<n;i++)cin>>b[i]; for(int i=0;i<n;i++)p[b[i]]+=a[i]; bool flag=false; for(int i=1;i<=n;i++)if(p[0]<p[i])flag=true; cout<<(flag?"NO":"YES")<<endl; }