Submission #00112


ソースコード

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:27:05
言語 C++11
状態 Wrong Answer
得点 0
ソースコード長 1026 Byte
最大実行時間 381 ms
最大メモリ使用量 19456 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 AC 25 ms 440 KB
1
Input03_easy WA 21 ms 532 KB
1
Input04_normal AC 15 ms 488 KB
2
Input05_normal WA 18 ms 572 KB
2
Input06_normal AC 18 ms 528 KB
2
Input07_hard WA 28 ms 604 KB
3
Input08_hard WA 17 ms 548 KB
3
Input09_hard WA 20 ms 752 KB
3
TrueInput01 WA 377 ms 6260 KB
4
TrueInput02 WA 347 ms 7756 KB
4
TrueInput03 WA 366 ms 9124 KB
4
TrueInput04 WA 365 ms 10488 KB
4
TrueInput05 WA 381 ms 11988 KB
4
TrueInput06 WA 361 ms 9388 KB
4
TrueInput07 WA 362 ms 14972 KB
4
TrueInput08 WA 368 ms 16464 KB
4
TrueInput09 WA 372 ms 17960 KB
4
TrueInput10 WA 373 ms 19456 KB
4