提出 #75416091
ソースコード 拡げる
#line 2 "/Users/blue_jam/ProconLibrary/misc/template.hpp"
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
#define ALL(x) (x).begin(), (x).end()
using ll = long long;
#ifndef EPS
const double eps = 1e-10;
#else
const double eps = EPS;
#endif
#line 2 "abc456/B/main.cpp"
void solve(std::vector<std::vector<long long>> A) {
double ans = 0.0;
for (ll i = 0; i < 6; i++) {
for (ll j = 0; j < 6; j++) {
for (ll k = 0; k < 6; k++) {
vector<ll> p;
p.push_back(A[0][i]);
p.push_back(A[1][j]);
p.push_back(A[2][k]);
sort(ALL(p));
if (p[0] == 4 && p[1] == 5 && p[2] == 6) {
ans += 1.0;
}
}
}
}
cout << fixed << setprecision(10) << ans / 6 / 6 / 6 << endl;
}
int main() {
std::vector<std::vector<long long>> A(3, std::vector<long long>(6));
for(int i = 0 ; i < 3 ; i++){
for(int j = 0 ; j < 6 ; j++){
std::scanf("%lld", &A[i][j]);
}
}
solve(std::move(A));
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - 456 |
| ユーザ | blue_jam |
| 言語 | C++23 (GCC 15.2.0) |
| 得点 | 200 |
| コード長 | 1193 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 3832 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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 | 3676 KiB |
| random_02.txt | AC | 1 ms | 3676 KiB |
| random_03.txt | AC | 1 ms | 3800 KiB |
| random_04.txt | AC | 1 ms | 3744 KiB |
| random_05.txt | AC | 1 ms | 3668 KiB |
| random_06.txt | AC | 1 ms | 3672 KiB |
| random_07.txt | AC | 1 ms | 3724 KiB |
| random_08.txt | AC | 1 ms | 3684 KiB |
| random_09.txt | AC | 1 ms | 3696 KiB |
| random_10.txt | AC | 1 ms | 3832 KiB |
| random_11.txt | AC | 1 ms | 3696 KiB |
| random_12.txt | AC | 1 ms | 3652 KiB |
| sample_01.txt | AC | 1 ms | 3724 KiB |
| sample_02.txt | AC | 1 ms | 3808 KiB |