Submission #00036


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for(int i=0;i<n;i++)
#define iFOR(i,x,n)for(int i=x;i<n;i++)
#define fin <<'\n'
#define __ <<" "<<
#define ___ <<" "
#define bash push_back
#define ALL(x) x.begin(),x.end()
typedef long long ll;
typedef pair < int , int > pii;
typedef vector < int > vit;
static const signed int INF = 0x3f3f3f3f;
static const signed long long LINF = 0x3f3f3f3f3f3f3f3fLL;
static const signed int SMOD = 1000000007;
static const signed int NMOD = 1000000009;
static const signed int dx[]={1,0,-1,0,1,1,-1,-1};
static const signed int dy[]={0,-1,0,1,-1,1,-1,1};
bool inside(int x,int y,int w,int h){return (x>=0 && y>=0 && x<w && y<h);}
template<class T>T abs(T &x){return x<0 ? -x : x;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
//#define int long long
inline void solve(){
int n;
int x, y, z;
int a[105],b[105],c[105];
bool isa[105]={};
bool isb[105]={};
bool isc[105]={};
cin >> n;
cin >> x;
for(int i = 0; i < x; i++) {
cin >> a[i];
isa[a[i]] = true;
}
cin >> y;
for(int i = 0; i < y; i++) {
cin >> b[i];
isb[b[i]] = true;
}
cin >> z;
for(int i = 0; i < z; i++) {
cin >> c[i];
isc[c[i]] = true;
}
int cnt = 0;
for(int i = 1; i <= n; i++) {
if(!isa[i] && isc[i] || isb[i] && isc[i])
cnt++;
}
cout << cnt << endl;
}
struct xyz{ xyz(){ cin.tie(0), ios::sync_with_stdio(false); cout <<fixed<<setprecision(12);};}xyzzy;signed main(){solve();return 0;}

ステータス

項目 データ
問題 0004 - AZAS
ユーザー名 社会主義共和国連邦
投稿日時 2019-09-10 16:15:14
言語 C++14
状態 Accepted
得点 8
ソースコード長 1757 Byte
最大実行時間 28 ms
最大メモリ使用量 692 KB

セット

セット 得点 Cases
1 ALL 8 / 8 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
00-sample1.in AC 21 ms 476 KB
1
00-sample2.in AC 18 ms 564 KB
1
01_corner_00.in AC 20 ms 648 KB
1
01_corner_01.in AC 16 ms 604 KB
1
01_corner_02.in AC 23 ms 560 KB
1
01_corner_03.in AC 24 ms 520 KB
1
01_corner_04.in AC 20 ms 612 KB
1
01_corner_05.in AC 19 ms 692 KB
1
01_corner_06.in AC 21 ms 644 KB
1
01_corner_07.in AC 23 ms 596 KB
1
03_rand_00.in AC 24 ms 556 KB
1
03_rand_01.in AC 22 ms 512 KB
1
03_rand_02.in AC 22 ms 596 KB
1
03_rand_03.in AC 21 ms 552 KB
1
03_rand_04.in AC 19 ms 508 KB
1
03_rand_05.in AC 20 ms 592 KB
1
03_rand_06.in AC 21 ms 548 KB
1
03_rand_07.in AC 23 ms 500 KB
1
03_rand_08.in AC 25 ms 456 KB
1
03_rand_09.in AC 24 ms 536 KB
1
03_rand_10.in AC 28 ms 620 KB
1
03_rand_11.in AC 21 ms 576 KB
1
03_rand_12.in AC 22 ms 532 KB
1
03_rand_13.in AC 23 ms 488 KB
1
03_rand_14.in AC 20 ms 576 KB
1
03_rand_15.in AC 24 ms 660 KB
1