Submission #00085
ソースコード
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 53 54 55 | #include<bits/stdc++.h> using namespace std; int dp( int now, int p); int k,n; int result[1001][1001]; int judge; main(){ int i,j,l; cin >> k >> n; for (i=0;i<k;i++){ for (j=0;j<n;j++){ cin >> result[i][j]; } } for (i=0;i<n;i++){ judge = dp(result[0][i],0); if (judge == 1){ break ; } } if (judge == 1){ cout << "Found" << endl; } else { cout << "Nothing" << endl; } return 0; } int dp( int now, int p){ int i; if (p == k-1){ if (now == 0){ return 1; } else { return 0; } } else { for (i=0;i<n;i++){ return dp(now^result[p+1][i],p+1); } } } |
ステータス
項目 | データ |
---|---|
問題 | 0004 - 「とっぴー」カウンセリング |
ユーザー名 | ei1409 |
投稿日時 | 2016-04-27 17:29:24 |
言語 | C++11 |
状態 | Time Limit Exceeded |
得点 | 0 |
ソースコード長 | 376 Byte |
最大実行時間 | 1000 ms |
最大メモリ使用量 | 1364 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 100 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 13 ms | 472 KB |
1
|
in2.txt | AC | 14 ms | 496 KB |
1
|
in3.txt | AC | 13 ms | 460 KB |
1
|
in4.txt | AC | 14 ms | 432 KB |
1
|
in5.txt | AC | 11 ms | 656 KB |
1
|
in6.txt | AC | 13 ms | 628 KB |
1
|
in7.txt | AC | 12 ms | 588 KB |
1
|
in8.txt | AC | 13 ms | 552 KB |
1
|
in9.txt | WA | 11 ms | 524 KB |
1
|
in10.txt | AC | 13 ms | 436 KB |
1
|
in11.txt | AC | 11 ms | 660 KB |
1
|
in12.txt | AC | 14 ms | 500 KB |
1
|
in13.txt | WA | 14 ms | 456 KB |
1
|
in14.txt | AC | 14 ms | 420 KB |
1
|
in15.txt | AC | 13 ms | 520 KB |
1
|