Submission #00005
ソースコード
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 | #include <iostream> #include <string> #include <stack> #include <queue> #include <cstring> #include <algorithm> #include <vector> //#include <cstdio> #include <cmath> #include <cstdlib> #include <functional> using namespace std; #define elif else if #define echo cout << #define read cin >> #define fin << '\n' #define finn cout << '\n' typedef long long llong; typedef bool boolean; typedef pair< int , int > pii; const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; const int dy[] = {0, 1, 0, -1, 1, -1, 1, -1}; boolean canMove( int x, int y, int w, int h){ return (x>=0&&y>=0&&x<w&&y<h);}; const int INF = 1 << 29; boolean flg[100100][17]; int main(){ cin.tie(0); ios::sync_with_stdio( false ); int h, q, n; read h >> q >> n; for ( int i = 0; i < n; i++ ) { int command; read command; if ( command == 0 ) { int a, b, c; read a >> b >> c; flg[a][b] |= c; } else { int a, b; read a >> b; boolean tmp = true ; for ( int j = 0; j < b; j++ ) { int c; read c; tmp &= flg[a][c]; } echo ( tmp? "Yes" : "No" ) fin; } } return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0008 - 人権判定 |
ユーザー名 | r1825 |
投稿日時 | 2018-08-22 10:02:32 |
言語 | C++14 |
状態 | Accepted |
得点 | 10 |
ソースコード長 | 1052 Byte |
最大実行時間 | 596 ms |
最大メモリ使用量 | 215968 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 | 45 ms | 480 KB |
1
|
|||
Input02_easy | AC | 22 ms | 436 KB |
1
|
|||
Input03_easy | AC | 21 ms | 528 KB |
1
|
|||
Input04_normal | AC | 30 ms | 612 KB |
2
|
|||
Input05_normal | AC | 22 ms | 568 KB |
2
|
|||
Input06_normal | AC | 25 ms | 652 KB |
2
|
|||
Input07_hard | AC | 27 ms | 736 KB |
3
|
|||
Input08_hard | AC | 22 ms | 692 KB |
3
|
|||
Input09_hard | AC | 36 ms | 1028 KB |
3
|
|||
TrueInput01 | AC | 488 ms | 23236 KB |
4
|
|||
TrueInput02 | AC | 448 ms | 44920 KB |
4
|
|||
TrueInput03 | AC | 550 ms | 66472 KB |
4
|
|||
TrueInput04 | AC | 532 ms | 88412 KB |
4
|
|||
TrueInput05 | AC | 547 ms | 109964 KB |
4
|
|||
TrueInput06 | AC | 486 ms | 128832 KB |
4
|
|||
TrueInput07 | AC | 516 ms | 150800 KB |
4
|
|||
TrueInput08 | AC | 475 ms | 172484 KB |
4
|
|||
TrueInput09 | AC | 596 ms | 194160 KB |
4
|
|||
TrueInput10 | AC | 543 ms | 215968 KB |
4
|