Submission #75424820
Source Code Expand
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
const long long INF = (1LL << 62) - (1LL << 31) - 1;
int di[4] = {-1,0,1,0};
int dj[4] = {0,-1,0,1};
int main() {
vector<int> a(6), b(6), c(6);
for (int i = 0; i < 6; i++) {
cin >> a[i];
}
for (int i = 0; i < 6; i++) {
cin >> b[i];
}
for (int i = 0; i < 6; i++) {
cin >> c[i];
}
double bunbo = 6 * 6 * 6;
double bunshi = 0;
for (int i = 0; i < 6; i++) {
for (int j = 0; j < 6; j++) {
for (int k = 0; k < 6; k++) {
set<int> me;
me.insert(a[i]); me.insert(b[j]); me.insert(c[k]);
auto ita = me.find(4); auto itb = me.find(5); auto itc = me.find(6);
if (ita != me.end() && itb != me.end() && itc != me.end()) {
bunshi++;
}
}
}
}
cout << fixed << setprecision(7) << bunshi / bunbo << endl;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - 456 |
| User | takakan448 |
| Language | C++23 (GCC 15.2.0) |
| Score | 200 |
| Code Size | 1045 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3848 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 | 3828 KiB |
| random_02.txt | AC | 1 ms | 3816 KiB |
| random_03.txt | AC | 1 ms | 3692 KiB |
| random_04.txt | AC | 1 ms | 3696 KiB |
| random_05.txt | AC | 1 ms | 3792 KiB |
| random_06.txt | AC | 1 ms | 3848 KiB |
| random_07.txt | AC | 1 ms | 3696 KiB |
| random_08.txt | AC | 1 ms | 3796 KiB |
| random_09.txt | AC | 1 ms | 3696 KiB |
| random_10.txt | AC | 1 ms | 3820 KiB |
| random_11.txt | AC | 1 ms | 3780 KiB |
| random_12.txt | AC | 1 ms | 3808 KiB |
| sample_01.txt | AC | 1 ms | 3792 KiB |
| sample_02.txt | AC | 1 ms | 3832 KiB |