Submission #00109


ソースコード

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
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for(int i=0;i<n;i++)
#define why(n,x) int n;while(cin >>n,n!=x)
#define iFOR(i,x,n)for(int i=x;i<n;i++)
//#define cin cin<<
//#define cout cout<<
//#define fin <<'\n'
int dx[]={1,0,-1,0};
int dy[]={0,-1,0,1};
int dxx[]={1,1,0,-1,-1,-1,0,1};
int dyy[]={0,-1,-1,-1,0,1,1,1};
bool inside(int x,int y,int w,int h){
return (x>=0 && y>=0 && x<w && y<h);}
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vit;
typedef map<string,int> mstit;
//typedef priority-queue<int> pqit;
int ans[1000001][20];
int main(){
cin.tie(0), ios::sync_with_stdio(false);
int h,q,n;
int data;
int a,b,c;
cin >>h>>q>>n;
FOR(i,n){
cin>>data;
if(!data){
cin >>a>>b>>c;
ans[a][b]=c;
}
if(data){
cin >>a>>b;
int OK=1;
FOR(j,b){
cin >>c;
OK&=ans[a][c];
}
if(OK) cout <<"Yes\n";
else cout<<"no\n";
}
}
return 0;
}

ステータス

項目 データ
問題 0008 - 人権判定
ユーザー名 ei1821
投稿日時 2018-08-22 12:24:42
言語 C++11
状態 Wrong Answer
得点 0
ソースコード長 1026 Byte
最大実行時間 411 ms
最大メモリ使用量 19580 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01_easy WA 26 ms 480 KB
1
Input02_easy WA 20 ms 436 KB
1
Input03_easy WA 22 ms 392 KB
1
Input04_normal WA 21 ms 476 KB
2
Input05_normal WA 22 ms 436 KB
2
Input06_normal WA 20 ms 388 KB
2
Input07_hard WA 25 ms 468 KB
3
Input08_hard WA 25 ms 540 KB
3
Input09_hard WA 27 ms 740 KB
3
TrueInput01 WA 377 ms 6252 KB
4
TrueInput02 WA 366 ms 7488 KB
4
TrueInput03 WA 356 ms 8984 KB
4
TrueInput04 WA 381 ms 10480 KB
4
TrueInput05 WA 371 ms 11976 KB
4
TrueInput06 WA 341 ms 9376 KB
4
TrueInput07 WA 386 ms 14960 KB
4
TrueInput08 WA 371 ms 16460 KB
4
TrueInput09 WA 360 ms 18084 KB
4
TrueInput10 WA 411 ms 19580 KB
4