ソースコード 拡げる

Copy
```#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <bitset>
#include <queue>
using namespace std;

//conversion
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//typedef
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long ll;

//container util
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)

//constant
const double EPS = 1e-10;
const int MAXI = 1234567890;

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

void printList(vector<int>& v) {
for (size_t i = 0; i < v.size(); i++) {
cout << v[i] << " ";
}
cout << endl;
}

void printMatrix(vector< vector<int> >& v) {
for (size_t i = 0; i < v.size(); i++) {
printList(v[i]);
}
cout << endl;
}

int main() {
VI es(6, 0);
VI ls(6, 0);
int b;
for (int i = 0; i < 6; i++) {
cin >> es[i];
}
cin >> b;

for (int i = 0; i < 6; i++) {
cin >> ls[i];
}
int sum = 0;
bool bonus = false;
for (int i = 0; i < 6; i++) {
for (int j = 0; j < 6; j++) {
if (es[i] != ls[j]) continue;
sum++;
}
}

for (int i = 0; i < 6; i++) {
if (ls[i] == b) bonus = true;
}

if (sum < 3) cout << 0 << endl;
else if (sum == 3) cout << 5 << endl;
else if (sum == 4) cout << 4 << endl;
else if (sum == 5 && !bonus) cout << 3 << endl;
else if (sum == 5 && bonus) cout << 2 << endl;
else if (sum == 6) cout << 1 << endl;
return 0;
}
```

#### 提出情報

提出日時 2012-07-21 20:09:04+0900 A - 宝くじ ganatcs C++ (G++ 4.6.4) 100 2221 Byte AC 24 ms 820 KB

#### ジャッジ結果

セット名 All

 AC × 51
セット名 テストケース
All 00_1_01.txt, 00_1_02.txt, 00_2_01.txt, 00_2_02.txt, 00_3_01.txt, 00_3_02.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, 01_rand_00.txt, 01_rand_01.txt, 01_rand_02.txt, 01_rand_03.txt, 01_rand_04.txt, 01_rand_05.txt, 01_rand_06.txt, 01_rand_07.txt, 01_rand_08.txt, 01_rand_09.txt, 01_rand_10.txt, 01_rand_11.txt, 01_rand_12.txt, 01_rand_13.txt, 01_rand_14.txt, 01_rand_15.txt, 01_rand_16.txt, 01_rand_17.txt, 01_rand_18.txt, 01_rand_19.txt, 01_rand_20.txt, 01_rand_21.txt, 01_rand_22.txt, 01_rand_23.txt, 01_rand_24.txt, 01_rand_25.txt, 01_rand_26.txt, 01_rand_27.txt, 01_rand_28.txt, 01_rand_29.txt, 01_rand_30.txt, 01_rand_31.txt, 01_rand_32.txt, 01_rand_33.txt, 01_rand_34.txt, 01_rand_35.txt, 01_rand_36.txt, 01_rand_37.txt, 01_rand_38.txt, 01_rand_39.txt
ケース名 結果 実行時間 メモリ
00_1_01.txt AC 24 ms 736 KB
00_1_02.txt AC 20 ms 792 KB
00_2_01.txt AC 21 ms 816 KB
00_2_02.txt AC 21 ms 784 KB
00_3_01.txt AC 21 ms 796 KB
00_3_02.txt AC 21 ms 792 KB
00_sample_01.txt AC 21 ms 820 KB
00_sample_02.txt AC 21 ms 784 KB
00_sample_03.txt AC 21 ms 796 KB
00_sample_04.txt AC 21 ms 788 KB
00_sample_05.txt AC 20 ms 784 KB
01_rand_00.txt AC 23 ms 780 KB
01_rand_01.txt AC 20 ms 736 KB
01_rand_02.txt AC 21 ms 768 KB
01_rand_03.txt AC 21 ms 788 KB
01_rand_04.txt AC 20 ms 808 KB
01_rand_05.txt AC 20 ms 776 KB
01_rand_06.txt AC 21 ms 788 KB
01_rand_07.txt AC 21 ms 792 KB
01_rand_08.txt AC 21 ms 764 KB
01_rand_09.txt AC 20 ms 784 KB
01_rand_10.txt AC 21 ms 764 KB
01_rand_11.txt AC 21 ms 784 KB
01_rand_12.txt AC 20 ms 784 KB
01_rand_13.txt AC 21 ms 760 KB
01_rand_14.txt AC 21 ms 788 KB
01_rand_15.txt AC 22 ms 764 KB
01_rand_16.txt AC 21 ms 784 KB
01_rand_17.txt AC 21 ms 740 KB
01_rand_18.txt AC 21 ms 784 KB
01_rand_19.txt AC 21 ms 788 KB
01_rand_20.txt AC 21 ms 792 KB
01_rand_21.txt AC 21 ms 808 KB
01_rand_22.txt AC 20 ms 788 KB
01_rand_23.txt AC 21 ms 788 KB
01_rand_24.txt AC 21 ms 792 KB
01_rand_25.txt AC 20 ms 756 KB
01_rand_26.txt AC 21 ms 792 KB
01_rand_27.txt AC 22 ms 792 KB
01_rand_28.txt AC 20 ms 796 KB
01_rand_29.txt AC 21 ms 784 KB
01_rand_30.txt AC 22 ms 788 KB
01_rand_31.txt AC 21 ms 788 KB
01_rand_32.txt AC 21 ms 764 KB
01_rand_33.txt AC 21 ms 788 KB
01_rand_34.txt AC 21 ms 760 KB
01_rand_35.txt AC 21 ms 792 KB
01_rand_36.txt AC 21 ms 740 KB
01_rand_37.txt AC 21 ms 788 KB
01_rand_38.txt AC 21 ms 784 KB
01_rand_39.txt AC 21 ms 784 KB