Submission #3417408
Source Code Expand
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;++i) #define rrep(i,n) for(int i=n-1;i>=0;--i) #define yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;} #define MAX_N 1002 #define i197 1000000007 using namespace std; typedef long long ll; typedef pair<ll,ll> P1; typedef pair<int,int> Pi; typedef pair<double,Pi> Pdi; typedef pair<ll,int>Pli; typedef pair<P1,ll> P2; const ll INF=100000000000000001; struct edge{int to,cost;}; int dy[]={0, 0, 1, -1}; int dx[]={1, -1, 0, 0}; struct Road{double cost;int a,b;}; int main() { int n,m; int d[101],t[101]; int total=0; cin>>n; rep(i,n){ cin>>d[i]; } cin>>m; rep(j,m){ cin>>t[j]; } rep(j,m){ rep(i,n){ if(t[j]==d[i]){ total++; d[i]=0; break; } } } if(total==m){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Problem Set |
User | akarinkof |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 899 Byte |
Status | RE |
Exec Time | 99 ms |
Memory | 256 KB |
Judge Result
Set Name | sample | dataset1 | dataset2 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | 0 / 100 | ||||||||
Status |
|
|
|
Set Name | Test Cases |
---|---|
sample | sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt |
dataset1 | sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt |
dataset2 | sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 02-07.txt, 02-08.txt, 02-09.txt, 02-10.txt, sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01-01.txt | AC | 1 ms | 256 KB |
01-02.txt | AC | 1 ms | 256 KB |
01-03.txt | AC | 1 ms | 256 KB |
01-04.txt | AC | 1 ms | 256 KB |
01-05.txt | AC | 1 ms | 256 KB |
01-06.txt | AC | 1 ms | 256 KB |
01-07.txt | AC | 1 ms | 256 KB |
01-08.txt | AC | 1 ms | 256 KB |
01-09.txt | AC | 1 ms | 256 KB |
02-01.txt | RE | 98 ms | 256 KB |
02-02.txt | RE | 97 ms | 256 KB |
02-03.txt | RE | 97 ms | 256 KB |
02-04.txt | RE | 97 ms | 256 KB |
02-05.txt | RE | 99 ms | 256 KB |
02-06.txt | RE | 97 ms | 256 KB |
02-07.txt | RE | 99 ms | 256 KB |
02-08.txt | RE | 98 ms | 256 KB |
02-09.txt | RE | 96 ms | 256 KB |
02-10.txt | RE | 97 ms | 256 KB |
sample-01.txt | AC | 1 ms | 256 KB |
sample-02.txt | AC | 1 ms | 256 KB |
sample-03.txt | AC | 1 ms | 256 KB |
sample-04.txt | AC | 1 ms | 256 KB |