Submission #33270


Source Code Expand

Copy
//template ver2.00
//------------------------------------------

//include
//------------------------------------------
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>

using namespace std;

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

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}
template<class T> inline T is_inner(T x, T a, T b) {return a <= x && x < b;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define MP make_pair
#define EACH(i, c) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(c, e) ((c).find(e) != (c).end())

//repetition
//------------------------------------------
#define FOR(i, a, b) for (int i = (a);i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)

//IO
//------------------------------------------
#define LF(x) cout << (x) << endl;
#define LFA(a, n) cout << a[0]; FOR(itr, 1, n) {cout << " " << a[itr];} cout << endl;
#define LFP(x, w) cout << setprecision((w)); cout << setiosflags(ios::fixed); cout << (x) << endl;

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int INF = 1e9;
const int DI[] = {0, 1, 0, -1};
const int DJ[] = {1, 0, -1, 0};

//clear memory
//--------------------------------------------
#define CLR(a) memset((a), 0 , sizeof(a))

//debug
//--------------------------------------------
#define DUMP(x)  cerr << #x << " = " << (x) << endl;
#define DUMPA(a, n) cerr << #a << " = {" << a[0]; FOR(itr, 1, n) { cout << ", " << a[itr]; } cerr << "}" << endl;
#define DUMPAA(a, n, m) REP(itr, n) {REP(jtr, m) {cout << a[itr][jtr] << " ";} cout << endl;}

int e[6];
int b;
int l[6];

void init()
{
}

void solve()
{
     int n = 0;
     REP(i, 6) REP(j, 6) {
	  if (e[i] == l[j]) ++n;
     }
     bool bonus = false;
     REP(i, 6) if (l[i] == b) bonus = true;
     int ans = 8 - n;
     if (n == 6) ans = 1;
     if (n == 5 && bonus) ans = 2;
     if (n < 3) ans = 0;
     LF(ans);
}

int main()
{
     init();
     REP(i, 6) cin >> e[i];
     cin >> b;
     REP(i, 6) cin >> l[i];
     solve();
     return 0;
}

Submission Info

Submission Time
Task A - 宝くじ
User wotsushi
Language C++ (GCC 4.4.7)
Score 100
Code Size 2819 Byte
Status AC
Exec Time 26 ms
Memory 880 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 51
Set Name Test Cases
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
Case Name Status Exec Time Memory
00_1_01.txt AC 22 ms 796 KB
00_1_02.txt AC 26 ms 780 KB
00_2_01.txt AC 23 ms 792 KB
00_2_02.txt AC 23 ms 784 KB
00_3_01.txt AC 21 ms 788 KB
00_3_02.txt AC 22 ms 796 KB
00_sample_01.txt AC 22 ms 768 KB
00_sample_02.txt AC 23 ms 788 KB
00_sample_03.txt AC 22 ms 792 KB
00_sample_04.txt AC 22 ms 788 KB
00_sample_05.txt AC 23 ms 784 KB
01_rand_00.txt AC 23 ms 792 KB
01_rand_01.txt AC 22 ms 788 KB
01_rand_02.txt AC 22 ms 792 KB
01_rand_03.txt AC 25 ms 788 KB
01_rand_04.txt AC 23 ms 792 KB
01_rand_05.txt AC 23 ms 788 KB
01_rand_06.txt AC 23 ms 788 KB
01_rand_07.txt AC 22 ms 864 KB
01_rand_08.txt AC 23 ms 772 KB
01_rand_09.txt AC 25 ms 880 KB
01_rand_10.txt AC 22 ms 784 KB
01_rand_11.txt AC 24 ms 764 KB
01_rand_12.txt AC 23 ms 756 KB
01_rand_13.txt AC 22 ms 788 KB
01_rand_14.txt AC 22 ms 788 KB
01_rand_15.txt AC 23 ms 788 KB
01_rand_16.txt AC 23 ms 816 KB
01_rand_17.txt AC 22 ms 792 KB
01_rand_18.txt AC 23 ms 792 KB
01_rand_19.txt AC 23 ms 860 KB
01_rand_20.txt AC 22 ms 784 KB
01_rand_21.txt AC 22 ms 788 KB
01_rand_22.txt AC 22 ms 764 KB
01_rand_23.txt AC 23 ms 784 KB
01_rand_24.txt AC 22 ms 784 KB
01_rand_25.txt AC 22 ms 788 KB
01_rand_26.txt AC 22 ms 792 KB
01_rand_27.txt AC 23 ms 788 KB
01_rand_28.txt AC 21 ms 788 KB
01_rand_29.txt AC 22 ms 788 KB
01_rand_30.txt AC 22 ms 796 KB
01_rand_31.txt AC 22 ms 792 KB
01_rand_32.txt AC 22 ms 788 KB
01_rand_33.txt AC 22 ms 792 KB
01_rand_34.txt AC 23 ms 792 KB
01_rand_35.txt AC 23 ms 780 KB
01_rand_36.txt AC 22 ms 760 KB
01_rand_37.txt AC 23 ms 784 KB
01_rand_38.txt AC 23 ms 792 KB
01_rand_39.txt AC 22 ms 792 KB