标签:io ar for sp amp as return hdu class
#include <cstdio> #include <map> using namespace std; map<int,int> a,b; int t[105],x,n; int main(){ while(~scanf("%d",&n)){ int flag=1; a.clear(); b.clear(); for(int i=1;i<=n;i++)scanf("%d",&t[i]),a[t[i]]=1; for(int i=1;i<=n;i++){ scanf("%d",&x); b[x]=1; if(a[x]!=1)flag=0; } for(int i=1;i<=n;i++)if(b[t[i]]!=1)flag=0; if(flag)puts("YES");else puts("NO"); }return 0; }
标签:io ar for sp amp as return hdu class
原文地址:http://www.cnblogs.com/forever97/p/4024523.html