Submission #57460688


Source Code Expand

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;
using pl = pair<ll, ll>;
constexpr ll INF = 1e9 + 7;
constexpr ll mod = 1e9 + 7;
constexpr ld eps = 1e-9;
const ld PI = acos(-1);

int main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    vector<int> a(6),b(6);
    for(auto &i : a)cin >> i;
    for(auto &i : b)cin >> i;
    int re = 1;
    for(int i = 0;i < 3;++i){
        re *= max(0,min(b[i + 3],a[i + 3]) - max(a[i],b[i]));
    }
    cout << (re? "Yes" : "No");
}

Submission Info

Submission Time
Task B - Intersection of Cuboids
User ZergTricky
Language C++ 20 (gcc 12.2)
Score 250
Code Size 540 Byte
Status AC
Exec Time 2 ms
Memory 3636 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 250 / 250
Status
AC × 3
AC × 22
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand.txt, 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, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hand.txt AC 1 ms 3584 KiB
random_01.txt AC 1 ms 3496 KiB
random_02.txt AC 1 ms 3452 KiB
random_03.txt AC 1 ms 3504 KiB
random_04.txt AC 1 ms 3516 KiB
random_05.txt AC 1 ms 3384 KiB
random_06.txt AC 1 ms 3384 KiB
random_07.txt AC 2 ms 3584 KiB
random_08.txt AC 1 ms 3444 KiB
random_09.txt AC 1 ms 3592 KiB
random_10.txt AC 1 ms 3596 KiB
random_11.txt AC 1 ms 3448 KiB
random_12.txt AC 1 ms 3508 KiB
random_13.txt AC 1 ms 3584 KiB
random_14.txt AC 2 ms 3588 KiB
random_15.txt AC 1 ms 3496 KiB
random_16.txt AC 1 ms 3452 KiB
random_17.txt AC 2 ms 3592 KiB
random_18.txt AC 1 ms 3636 KiB
sample_01.txt AC 1 ms 3492 KiB
sample_02.txt AC 1 ms 3384 KiB
sample_03.txt AC 1 ms 3392 KiB