Submission #00038
ソースコード
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> using namespace std; int k,n; int t[6][6]; int slv( int nn, int bd); int main(){ cin>>n>>k; for ( int i=0;i<n;i++){ for ( int j=0;j<k;j++){ cin>>t[i][j]; } } int ans=slv(0,0); if (ans==1)cout<< "Found" <<endl; else cout<< "Nothing" <<endl; } int slv( int nn, int bd){ int ans=0; if (nn==n){ if (bd==0) return (1); else return (0); } for ( int i=0;i<k;i++){ ans=ans | slv(nn+1,bd^t[nn][i]); } return (ans); } |
ステータス
項目 | データ |
---|---|
問題 | 0002 - 回れ雛月花 -Easy |
ユーザー名 | ei1516 |
投稿日時 | 2016-04-27 16:55:23 |
言語 | C++ |
状態 | Accepted |
得点 | 100 |
ソースコード長 | 623 Byte |
最大実行時間 | 12 ms |
最大メモリ使用量 | 540 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 100 / 100 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 22 ms | 476 KB |
1
|
in2.txt | AC | 11 ms | 308 KB |
1
|
in3.txt | AC | 14 ms | 416 KB |
1
|
in4.txt | AC | 11 ms | 516 KB |
1
|
in5.txt | AC | 13 ms | 616 KB |
1
|
in6.txt | AC | 10 ms | 592 KB |
1
|
in7.txt | AC | 13 ms | 440 KB |
1
|
in8.txt | AC | 10 ms | 540 KB |
1
|
in9.txt | AC | 10 ms | 640 KB |
1
|
in10.txt | AC | 13 ms | 448 KB |
1
|
in11.txt | AC | 11 ms | 428 KB |
1
|
in12.txt | AC | 11 ms | 404 KB |
1
|
in13.txt | AC | 14 ms | 384 KB |
1
|
in14.txt | AC | 10 ms | 616 KB |
1
|
in15.txt | AC | 13 ms | 460 KB |
1
|