Submission #4062876
Source Code Expand
#include <iostream> #include <algorithm> #include <vector> #include <map> #include <set> #include <string> #include <cmath> #include <iomanip> #include <queue> #include <unordered_map> #include <unordered_set> #include <bitset> #include <cassert> #include <cstring> #include <climits> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) #define SORT(c) sort((c).begin(), (c).end()) #define mp make_pair #define fi first #define se second #define pb push_back typedef long long ll; typedef pair<int, int> P; typedef vector<int> V; typedef map<int, int> M; constexpr ll INF = 1e18; constexpr ll MOD = 1e9 + 7; constexpr double PI = 3.14159265358979323846; constexpr int di[] = {0, 0, 1, -1}; constexpr int dj[] = {1, -1, 0, 0}; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m, d[212345], t[212345]; M mp; cin >> n; REP(i, n) { cin >> d[i]; mp[d[i]]++; } cin >> m; bool res = true; REP(i, m) { cin >> t[i]; if (mp[t[i]] < 1) res = false; mp[t[i]]--; } cout << (res ? "YES" : "NO") << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Problem Set |
User | Kats |
Language | C++14 (GCC 5.4.1) |
Score | 200 |
Code Size | 1257 Byte |
Status | AC |
Exec Time | 199 ms |
Memory | 11264 KB |
Judge Result
Set Name | sample | dataset1 | dataset2 | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | 100 / 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 | AC | 96 ms | 10368 KB |
02-02.txt | AC | 101 ms | 10496 KB |
02-03.txt | AC | 196 ms | 11264 KB |
02-04.txt | AC | 103 ms | 10496 KB |
02-05.txt | AC | 199 ms | 11264 KB |
02-06.txt | AC | 24 ms | 1024 KB |
02-07.txt | AC | 48 ms | 1792 KB |
02-08.txt | AC | 48 ms | 1792 KB |
02-09.txt | AC | 48 ms | 1792 KB |
02-10.txt | AC | 48 ms | 1792 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 |