提出 #45131936


ソースコード 拡げる

#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <climits>
#include <algorithm>
#include <numeric>
#include <functional>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <deque>
#include <cassert>
#include <vector>
#include <bitset>
#include <stack>
#include <list>
#include <iterator>
#include <complex>
#include <string>
#include <tuple>
#include <array>
#include <valarray>
#include <regex>
#include <random>

using namespace std;


void solvetc()
{
    int n;
    cin >> n;
    vector<int> a(n), b(n), c(n), d(n);
    for (int i = 0; i < n; i++)
    {
        cin >> a[i] >> b[i] >> c[i] >> d[i];
    }
    int sol = 0;
    for (int x = 0; x <= 100; x++)
    {
        for (int y = 0; y <= 100; y++)
        {
            bool is = 0;
            for (int i = 0; i < n; i++)
            {
                is |= (a[i] <= x && x < b[i] && c[i] <= y && y < d[i]);
            }
            sol += is;
        }
    }
    cout << sol << "\n";
}

signed main()
{
#ifdef ONPC	
    FILE* stream;
    freopen_s(&stream, "input.txt", "r", stdin);
#else
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
#endif

    int t;
    //cin >> t;
    t = 1;
    while (t--)
    {
        solvetc();
    }

    return 0;
}

提出情報

提出日時
問題 B - Overlapping sheets
ユーザ MikeMikett
言語 C++ 20 (gcc 12.2)
得点 200
コード長 1483 Byte
結果 AC
実行時間 2 ms
メモリ 3584 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 24
セット名 テストケース
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, hand_08.txt, hand_09.txt, hand_10.txt, random_00.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
ケース名 結果 実行時間 メモリ
example_00.txt AC 1 ms 3424 KiB
example_01.txt AC 1 ms 3476 KiB
example_02.txt AC 1 ms 3408 KiB
hand_00.txt AC 2 ms 3456 KiB
hand_01.txt AC 2 ms 3340 KiB
hand_02.txt AC 2 ms 3428 KiB
hand_03.txt AC 1 ms 3336 KiB
hand_04.txt AC 1 ms 3536 KiB
hand_05.txt AC 1 ms 3460 KiB
hand_06.txt AC 1 ms 3476 KiB
hand_07.txt AC 2 ms 3468 KiB
hand_08.txt AC 1 ms 3424 KiB
hand_09.txt AC 1 ms 3336 KiB
hand_10.txt AC 1 ms 3480 KiB
random_00.txt AC 1 ms 3468 KiB
random_01.txt AC 1 ms 3476 KiB
random_02.txt AC 1 ms 3468 KiB
random_03.txt AC 1 ms 3548 KiB
random_04.txt AC 2 ms 3480 KiB
random_05.txt AC 2 ms 3468 KiB
random_06.txt AC 2 ms 3344 KiB
random_07.txt AC 2 ms 3584 KiB
random_08.txt AC 2 ms 3344 KiB
random_09.txt AC 2 ms 3428 KiB