Submission #1293691


Source Code Expand

#include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <iterator>
#include <array>
#include <memory>
#include <stack>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    map<int,int>ant;
    map<int,int>bug;
    vi a,b;
    int _and,_or;
    int x,y; cin>>x>>y;
    rep(i,x){
        int temp; cin>>temp;
        a.push_back(temp);
        ant[temp]++;
    }
    rep(i,y){
        int temp; cin>>temp;
        b.push_back(temp);
        bug[temp]++;
        if(ant[temp])_and++;
    }
    printf("%Lf\n",(ld)_and/(ld)(x+y-_and));
    
}

Submission Info

Submission Time
Task B - メタ構文変数
User yebityon
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1521 Byte
Status AC
Exec Time 199 ms
Memory 15096 KB

Judge Result

Set Name Sample Subtask1 Subtask2 Subtask3
Score / Max Score 0 / 0 40 / 40 30 / 30 30 / 30
Status
AC × 2
AC × 11
AC × 19
AC × 28
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
Subtask1 sample_01.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt
Subtask2 sample_01.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt
Subtask3 sample_01.txt, sample_02.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask3_01.txt, subtask3_02.txt, subtask3_03.txt, subtask3_04.txt, subtask3_05.txt, subtask3_06.txt, subtask3_07.txt, subtask3_08.txt
Case Name Status Exec Time Memory
sample_01.txt AC 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
subtask1_01.txt AC 1 ms 256 KB
subtask1_02.txt AC 1 ms 256 KB
subtask1_03.txt AC 2 ms 256 KB
subtask1_04.txt AC 2 ms 384 KB
subtask1_05.txt AC 2 ms 384 KB
subtask1_06.txt AC 2 ms 384 KB
subtask1_07.txt AC 2 ms 384 KB
subtask1_08.txt AC 2 ms 384 KB
subtask1_09.txt AC 1 ms 256 KB
subtask1_10.txt AC 2 ms 384 KB
subtask2_01.txt AC 65 ms 6012 KB
subtask2_02.txt AC 156 ms 10360 KB
subtask2_03.txt AC 60 ms 4604 KB
subtask2_04.txt AC 157 ms 10360 KB
subtask2_05.txt AC 35 ms 3712 KB
subtask2_06.txt AC 80 ms 7676 KB
subtask2_07.txt AC 119 ms 8696 KB
subtask2_08.txt AC 154 ms 10360 KB
subtask3_01.txt AC 117 ms 9468 KB
subtask3_02.txt AC 198 ms 15096 KB
subtask3_03.txt AC 43 ms 3072 KB
subtask3_04.txt AC 177 ms 10360 KB
subtask3_05.txt AC 95 ms 7416 KB
subtask3_06.txt AC 199 ms 15096 KB
subtask3_07.txt AC 117 ms 8440 KB
subtask3_08.txt AC 191 ms 12280 KB