Submission #00057


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<bits/stdc++.h>
using namespace std;
int hw[26][26]={};
int n,k,ans=0;
int solve(int cnt, int bug)
{
if(cnt==n) return bug;
for(int i=0;i<k;i++){
if(!solve(cnt+1,bug^hw[cnt][i])) ans++;
}
return 1;
}
int main()
{
cin>>n>>k;
for(int i=0;i<n;i++){
for(int j=0;j<k;j++) cin>>hw[i][j];
}
solve(0,0);
if(ans) cout<<"Found"<<endl;
else cout<<"Nothing"<<endl;
}

ステータス

項目 データ
問題 0004 - 「とっぴー」カウンセリング
ユーザー名 ei1333
投稿日時 2016-04-27 17:08:06
言語 C++11
状態 Accepted
得点 100
ソースコード長 636 Byte
最大実行時間 306 ms
最大メモリ使用量 8292 KB

セット

セット 得点 Cases
1 ALL 100 / 100 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in1.txt AC 13 ms 476 KB
1
in2.txt AC 11 ms 564 KB
1
in3.txt AC 13 ms 668 KB
1
in4.txt AC 11 ms 644 KB
1
in5.txt AC 10 ms 620 KB
1
in6.txt AC 13 ms 600 KB
1
in7.txt AC 13 ms 576 KB
1
in8.txt AC 13 ms 548 KB
1
in9.txt AC 12 ms 656 KB
1
in10.txt AC 14 ms 448 KB
1
in11.txt AC 13 ms 548 KB
1
in12.txt AC 11 ms 400 KB
1
in13.txt AC 12 ms 508 KB
1
in14.txt AC 14 ms 612 KB
1
in15.txt AC 12 ms 588 KB
1