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 | #include<bits/stdc++.h> using namespace std; #define ll long long #define mp make_pair #define pb push_back #define fr first #define sc second #define Rep(i,n) for(int i=0;i<(n);i++) #define Rrep(i, m, n) for(int i=(m);i<(n);i++) #define All(v) v.begin(),v.end() #define Uniq(v) v.erase(unique(All(v)),v.end()) typedef pair< int , int > Pii; typedef pair< int , Pii> Pip; typedef pair<string, int > Psi; typedef vector< int > Vi; const int INF = (1<<30); const int dx[]={1,0,-1,0}, dy[]={0,-1,0,1}; int n, k; int t[5][5]; bool func( int y , int num ) { if ( y == n-1 ) { if ( num == 0 ) return true ; else return false ; } bool f = false ; Rep(i, k) { if ( func( y + 1, num ^ t[y+1][i] ) ) { f = true ; } } return f; } int main() { cin >> n >> k; Rep(i, n) Rep(j, k) cin >> t[i][j]; bool flag = false ; Rep(i, k) { if ( func( 0 , t[0][i]) ) { flag = true ; break ; } } if ( !flag ) cout << "Nothing" << endl; else cout << "Found" << endl; } |
ステータス
項目 | データ |
---|---|
問題 | 0002 - 回れ雛月花 -Easy |
ユーザー名 | ei1417 |
投稿日時 | 2016-04-27 16:55:01 |
言語 | C++11 |
状態 | Accepted |
得点 | 100 |
ソースコード長 | 747 Byte |
最大実行時間 | 15 ms |
最大メモリ使用量 | 780 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 100 / 100 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 13 ms | 472 KB |
1
|
in2.txt | AC | 13 ms | 440 KB |
1
|
in3.txt | AC | 11 ms | 548 KB |
1
|
in4.txt | AC | 10 ms | 524 KB |
1
|
in5.txt | AC | 13 ms | 496 KB |
1
|
in6.txt | AC | 14 ms | 604 KB |
1
|
in7.txt | AC | 12 ms | 584 KB |
1
|
in8.txt | AC | 11 ms | 556 KB |
1
|
in9.txt | AC | 14 ms | 656 KB |
1
|
in10.txt | AC | 14 ms | 452 KB |
1
|
in11.txt | AC | 11 ms | 428 KB |
1
|
in12.txt | AC | 13 ms | 536 KB |
1
|
in13.txt | AC | 12 ms | 516 KB |
1
|
in14.txt | AC | 12 ms | 492 KB |
1
|
in15.txt | AC | 16 ms | 468 KB |
1
|