Submission #00100


ソースコード

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
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
int mem[1000001];
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int h,q,n;
cin >> h >> q >> n;
int data,a,b,c;
for(int i = 0;i < n;i++){
cin >> data;
if(data == 0){
cin >> a >> b >> c;
if(c == 1){
int key = 1 << b;
mem[a] |= key;
}
}else{
cin >> a >> b;
int key = 0;
for(int i = 0;i < b;i++){
cin >> c;
key |= (1 << c);
}
if((mem[a] & key) == key){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
}
return 0;
}

ステータス

項目 データ
問題 0008 - 人権判定
ユーザー名 HTNei1730
投稿日時 2018-08-22 12:03:27
言語 C++11
状態 Accepted
得点 10
ソースコード長 619 Byte
最大実行時間 380 ms
最大メモリ使用量 16020 KB

セット

セット 得点 Cases
1 Easy 1 / 1 *easy
2 Normal 2 / 2 *normal
3 Hard 3 / 3 *hard
4 Bit 4 / 4 True*

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01_easy AC 23 ms 480 KB
1
Input02_easy AC 24 ms 440 KB
1
Input03_easy AC 21 ms 524 KB
1
Input04_normal AC 20 ms 608 KB
2
Input05_normal AC 21 ms 560 KB
2
Input06_normal AC 22 ms 520 KB
2
Input07_hard AC 27 ms 480 KB
3
Input08_hard AC 24 ms 424 KB
3
Input09_hard AC 27 ms 508 KB
3
TrueInput01 AC 350 ms 2120 KB
4
TrueInput02 AC 370 ms 3608 KB
4
TrueInput03 AC 368 ms 5096 KB
4
TrueInput04 AC 380 ms 6588 KB
4
TrueInput05 AC 368 ms 8080 KB
4
TrueInput06 AC 363 ms 9956 KB
4
TrueInput07 AC 378 ms 11564 KB
4
TrueInput08 AC 345 ms 13048 KB
4
TrueInput09 AC 363 ms 14532 KB
4
TrueInput10 AC 366 ms 16020 KB
4