Submission #75446433
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
int atcoder[4][7];
int scc;
signed main(){
for(int i=1;i<=3;++i)
for(int j=1;j<=6;++j)
scanf("%d",&atcoder[i][j]);
for(int i=1;i<=6;++i){
for(int ii=1;ii<=6;++ii){
for(int iii=1;iii<=6;++iii){
int first=atcoder[1][i];
int second=atcoder[2][ii];
int third=atcoder[3][iii];
bool four=false,five=false,six=false;
if(first==4 or second==4 or third==4)four=true;
if(first==5 or second==5 or third==5)five=true;
if(first==6 or second==6 or third==6)six=true;
if(four and five and six)++scc;
}
}
}
double ans=static_cast<double>(scc)/216;
printf("%.10lf\n",ans);
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - 456 |
| User | Chen_Zhen_DY |
| Language | C++23 (GCC 15.2.0) |
| Score | 200 |
| Code Size | 849 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3900 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| 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 | 3752 KiB |
| random_02.txt | AC | 1 ms | 3708 KiB |
| random_03.txt | AC | 1 ms | 3752 KiB |
| random_04.txt | AC | 1 ms | 3900 KiB |
| random_05.txt | AC | 1 ms | 3708 KiB |
| random_06.txt | AC | 1 ms | 3736 KiB |
| random_07.txt | AC | 1 ms | 3852 KiB |
| random_08.txt | AC | 1 ms | 3708 KiB |
| random_09.txt | AC | 1 ms | 3788 KiB |
| random_10.txt | AC | 1 ms | 3804 KiB |
| random_11.txt | AC | 1 ms | 3776 KiB |
| random_12.txt | AC | 1 ms | 3752 KiB |
| sample_01.txt | AC | 1 ms | 3900 KiB |
| sample_02.txt | AC | 1 ms | 3804 KiB |