Submission #75437657


Source Code Expand

//競プロ C++テンプレ
#include <bits/stdc++.h>
using namespace std;

#define all(x) x.begin(),x.end()
#define ll long long
#define pb push_back


int main() {
    vector<vector<int>> vec(3,vector<int>(6));
   
   for(int i = 0; i < 3; i++){
     for(int j = 0; j < 6;j++){
        vec.at(i).at(j) = 0;
     }
   }
   for(int i = 0; i < 3; i++){
     for(int j = 0; j < 6;j++){
        int k;
        cin >> k;
        vec.at(i).at(k-1)++;
        
     }
   }
   
   double ans = 0;
   vector<vector<double>> vhh(3,vector<double>(3));
   for(int i = 0; i < 3; i++){
     for(int j = 3; j < 6;j++){
        vhh.at(i).at(j-3) = double(vec.at(i).at(j)) / 6.0;
    
     }
     //cout << endl;
   }
   ans += vhh.at(0).at(0) * vhh.at(1).at(1) * vhh.at(2).at(2);
   ans += vhh.at(0).at(0) * vhh.at(1).at(2) * vhh.at(2).at(1);
    ans += vhh.at(1).at(0) * vhh.at(0).at(1) * vhh.at(2).at(2);
    ans += vhh.at(1).at(0) * vhh.at(0).at(2) * vhh.at(2).at(1);
    ans += vhh.at(2).at(0) * vhh.at(1).at(2) * vhh.at(0).at(1);
    ans += vhh.at(2).at(0) * vhh.at(1).at(1) * vhh.at(0).at(2);
    
    cout << ans << setprecision(10);
}


Submission Info

Submission Time
Task B - 456
User gumi11ta
Language C++23 (GCC 15.2.0)
Score 200
Code Size 1177 Byte
Status AC
Exec Time 1 ms
Memory 3900 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 14
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_01.txt AC 1 ms 3868 KiB
random_02.txt AC 1 ms 3880 KiB
random_03.txt AC 1 ms 3764 KiB
random_04.txt AC 1 ms 3900 KiB
random_05.txt AC 1 ms 3844 KiB
random_06.txt AC 1 ms 3764 KiB
random_07.txt AC 1 ms 3676 KiB
random_08.txt AC 1 ms 3764 KiB
random_09.txt AC 1 ms 3820 KiB
random_10.txt AC 1 ms 3768 KiB
random_11.txt AC 1 ms 3768 KiB
random_12.txt AC 1 ms 3816 KiB
sample_01.txt AC 1 ms 3900 KiB
sample_02.txt AC 1 ms 3716 KiB