提出 #75445174


ソースコード 拡げる

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[3][6];
    for(int i=0;i<3;i++){
        for(int j=0;j<6;j++){
            cin>>a[i][j];
        }
    }
    int cnt=0;
    for(int i=0;i<6;i++){
        for(int j=0;j<6;j++){
            for(int k=0;k<6;k++){
                int x=a[0][i];
                int y=a[1][j];
                int z=a[2][k];
                set<int>s={x,y,z};
                if(s.size()==3&&s.count(4)&&s.count(5)&&s.count(6)){
                    cnt++;
                }
            }
        }
    }
    double ans=(double)cnt/216.0;
    cout<<fixed<<setprecision(10)<<ans;
}

提出情報

提出日時
問題 B - 456
ユーザ ywrow
言語 C++23 (GCC 15.2.0)
得点 200
コード長 649 Byte
結果 AC
実行時間 1 ms
メモリ 3832 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 14
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
random_01.txt AC 1 ms 3764 KiB
random_02.txt AC 1 ms 3812 KiB
random_03.txt AC 1 ms 3784 KiB
random_04.txt AC 1 ms 3820 KiB
random_05.txt AC 1 ms 3760 KiB
random_06.txt AC 1 ms 3784 KiB
random_07.txt AC 1 ms 3764 KiB
random_08.txt AC 1 ms 3720 KiB
random_09.txt AC 1 ms 3832 KiB
random_10.txt AC 1 ms 3728 KiB
random_11.txt AC 1 ms 3764 KiB
random_12.txt AC 1 ms 3704 KiB
sample_01.txt AC 1 ms 3820 KiB
sample_02.txt AC 1 ms 3728 KiB