Submission #65218114


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

int main() {
    int N, M, Q;
    cin >> N >> M >> Q;
    vector<set<int>> can_view(N);
    vector<bool> can_view_all(N, false);
    for (int i = 0; i < Q; ++i) {
        int t, x;
        cin >> t >> x;
        --x;
        if (t == 1) {
            int y;
            cin >> y;
            --y;
            can_view[x].insert(y);
        } else if (t == 2) {
            can_view_all[x] = true;
        } else {
            int y;
            cin >> y;
            --y;
            if (can_view_all[x] || can_view[x].contains(y)) {
                cout << "Yes\n";
            } else {
                cout << "No\n";
            }
        }
    }
}

Submission Info

Submission Time
Task C - 403 Forbidden
User sotanishy
Language C++ 20 (gcc 12.2)
Score 300
Code Size 728 Byte
Status AC
Exec Time 217 ms
Memory 17116 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 43
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt
All 00_sample_01.txt, 00_sample_02.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt, 01_random_24.txt, 01_random_25.txt, 01_random_26.txt, 01_random_27.txt, 01_random_28.txt, 01_random_29.txt, 01_random_30.txt, 01_random_31.txt, 01_random_32.txt, 01_random_33.txt, 01_random_34.txt, 01_random_35.txt, 01_random_36.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1 ms 3536 KiB
00_sample_02.txt AC 1 ms 3488 KiB
01_random_01.txt AC 123 ms 3668 KiB
01_random_02.txt AC 149 ms 3556 KiB
01_random_03.txt AC 165 ms 3548 KiB
01_random_04.txt AC 146 ms 3612 KiB
01_random_05.txt AC 128 ms 4356 KiB
01_random_06.txt AC 156 ms 4288 KiB
01_random_07.txt AC 176 ms 4240 KiB
01_random_08.txt AC 148 ms 3548 KiB
01_random_09.txt AC 143 ms 6704 KiB
01_random_10.txt AC 182 ms 7684 KiB
01_random_11.txt AC 210 ms 8088 KiB
01_random_12.txt AC 153 ms 3540 KiB
01_random_13.txt AC 129 ms 5216 KiB
01_random_14.txt AC 159 ms 5300 KiB
01_random_15.txt AC 181 ms 5552 KiB
01_random_16.txt AC 149 ms 3508 KiB
01_random_17.txt AC 135 ms 6380 KiB
01_random_18.txt AC 170 ms 7164 KiB
01_random_19.txt AC 195 ms 7592 KiB
01_random_20.txt AC 151 ms 3648 KiB
01_random_21.txt AC 148 ms 6628 KiB
01_random_22.txt AC 185 ms 7936 KiB
01_random_23.txt AC 211 ms 8208 KiB
01_random_24.txt AC 155 ms 3488 KiB
01_random_25.txt AC 153 ms 15516 KiB
01_random_26.txt AC 186 ms 16860 KiB
01_random_27.txt AC 202 ms 17116 KiB
01_random_28.txt AC 169 ms 12600 KiB
01_random_29.txt AC 155 ms 15500 KiB
01_random_30.txt AC 188 ms 16868 KiB
01_random_31.txt AC 205 ms 17104 KiB
01_random_32.txt AC 173 ms 12716 KiB
01_random_33.txt AC 161 ms 15512 KiB
01_random_34.txt AC 198 ms 16900 KiB
01_random_35.txt AC 217 ms 17068 KiB
01_random_36.txt AC 176 ms 12644 KiB
02_handmade_01.txt AC 5 ms 12572 KiB
02_handmade_02.txt AC 5 ms 12656 KiB
02_handmade_03.txt AC 210 ms 7176 KiB
02_handmade_04.txt AC 212 ms 7212 KiB
02_handmade_05.txt AC 148 ms 15224 KiB