提出 #33435110


ソースコード 拡げる

#include <iostream>

int main() {
    int l1, r1, l2, r2;
    std::cin >> l1 >> r1 >> l2 >> r2;

    int l = std::max(l1, l2);
    int r = std::min(r1, r2);

    std::cout << std::max(r - l, 0) << std::endl;
}

提出情報

提出日時
問題 A - Intersection
ユーザ hidollara
言語 C++ (GCC 9.2.1)
得点 100
コード長 219 Byte
結果 AC
実行時間 6 ms
メモリ 3592 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 11
セット名 テストケース
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt
ケース名 結果 実行時間 メモリ
example_00.txt AC 5 ms 3512 KiB
example_01.txt AC 2 ms 3436 KiB
example_02.txt AC 2 ms 3512 KiB
hand_00.txt AC 2 ms 3560 KiB
hand_01.txt AC 2 ms 3552 KiB
hand_02.txt AC 6 ms 3588 KiB
hand_03.txt AC 2 ms 3520 KiB
hand_04.txt AC 2 ms 3444 KiB
hand_05.txt AC 2 ms 3592 KiB
hand_06.txt AC 3 ms 3592 KiB
hand_07.txt AC 2 ms 3552 KiB