Submission #75422312


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
int main() {
    int Ay = 0;
    int Ag = 0;
    int Ar = 0;
    int By = 0;
    int Bg = 0;
    int Br = 0;
    int Cy = 0;
    int Cg = 0;
    int Cr = 0;
    vector<int> A(6);
    for (int i = 0; i < 6; i++) {
      cin >> A.at(i);
      if (A.at(i) == 4) {
        Ay++;
      }
      if (A.at(i) == 5) {
        Ag++;
      }
      if (A.at(i) == 6) {
        Ar++;
      }
    }
    vector<int> B(6);
    for (int i = 0; i < 6; i++) {
      cin >> B.at(i);
      if (B.at(i) == 4) {
        By++;
      }
      if (B.at(i) == 5) {
        Bg++;
      }
      if (B.at(i) == 6) {
        Br++;
      }
    }
    vector<int> C(6);
    for (int i = 0; i < 6; i++) {
      cin >> C.at(i);
      if (C.at(i) == 4) {
        Cy++;
      }
      if (C.at(i) == 5) {
        Cg++;
      }
      if (C.at(i) == 6) {
        Cr++;
      }
    }
    int ans = 0;
    ans += Ay * Bg * Cr;
    ans += Ay * Br * Cg;
    ans += Ag * By * Cr;
    ans += Ag * Br * Cy;
    ans += Ar * By * Cg;
    ans += Ar * Bg * Cy;
    double t = ans / 216.000;
    cout << setprecision(10) << t << endl;
    return 0;
  }

Submission Info

Submission Time
Task B - 456
User KOJIKEE
Language C++23 (GCC 15.2.0)
Score 200
Code Size 1205 Byte
Status AC
Exec Time 1 ms
Memory 3852 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 3760 KiB
random_02.txt AC 1 ms 3756 KiB
random_03.txt AC 1 ms 3612 KiB
random_04.txt AC 1 ms 3760 KiB
random_05.txt AC 1 ms 3768 KiB
random_06.txt AC 1 ms 3696 KiB
random_07.txt AC 1 ms 3760 KiB
random_08.txt AC 1 ms 3764 KiB
random_09.txt AC 1 ms 3720 KiB
random_10.txt AC 1 ms 3772 KiB
random_11.txt AC 1 ms 3752 KiB
random_12.txt AC 1 ms 3748 KiB
sample_01.txt AC 1 ms 3760 KiB
sample_02.txt AC 1 ms 3852 KiB