Submission #65252131


Source Code Expand

#include<iostream>
#include<vector>
#include<unordered_map>
#include<unordered_set>
using namespace std;

int main() {
    int n, m; cin >> n >> m;
    int q; cin >> q;
    unordered_map<int, unordered_set<int>> mp;

    while(q--) {
        int ch, x, y; cin >> ch;
        if(ch == 1) {
            cin >> x >> y;
            mp[x].insert(y);
        }else if(ch == 2) {
            cin >> x;
            mp[x].insert(-1);
        }else {
            cin >> x >> y;
            if(mp[x].count(y) || mp[x].count(-1)) {
                cout << "Yes\n";
            }else cout << "No\n";
        }
    }
}

Submission Info

Submission Time
Task C - 403 Forbidden
User sivasaran2003
Language C++ 17 (gcc 12.2)
Score 300
Code Size 630 Byte
Status AC
Exec Time 282 ms
Memory 28676 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 3500 KiB
00_sample_02.txt AC 1 ms 3500 KiB
01_random_01.txt AC 123 ms 3576 KiB
01_random_02.txt AC 147 ms 3552 KiB
01_random_03.txt AC 159 ms 3588 KiB
01_random_04.txt AC 148 ms 3468 KiB
01_random_05.txt AC 128 ms 4196 KiB
01_random_06.txt AC 154 ms 4172 KiB
01_random_07.txt AC 167 ms 4172 KiB
01_random_08.txt AC 149 ms 3572 KiB
01_random_09.txt AC 155 ms 6244 KiB
01_random_10.txt AC 181 ms 7916 KiB
01_random_11.txt AC 204 ms 8184 KiB
01_random_12.txt AC 153 ms 3504 KiB
01_random_13.txt AC 136 ms 5100 KiB
01_random_14.txt AC 169 ms 5216 KiB
01_random_15.txt AC 175 ms 5192 KiB
01_random_16.txt AC 153 ms 3724 KiB
01_random_17.txt AC 144 ms 6304 KiB
01_random_18.txt AC 189 ms 6948 KiB
01_random_19.txt AC 191 ms 7108 KiB
01_random_20.txt AC 155 ms 3660 KiB
01_random_21.txt AC 150 ms 6568 KiB
01_random_22.txt AC 205 ms 7244 KiB
01_random_23.txt AC 207 ms 7540 KiB
01_random_24.txt AC 160 ms 3812 KiB
01_random_25.txt AC 216 ms 28676 KiB
01_random_26.txt AC 221 ms 27024 KiB
01_random_27.txt AC 259 ms 25880 KiB
01_random_28.txt AC 248 ms 25544 KiB
01_random_29.txt AC 207 ms 28616 KiB
01_random_30.txt AC 264 ms 27196 KiB
01_random_31.txt AC 229 ms 25968 KiB
01_random_32.txt AC 256 ms 25528 KiB
01_random_33.txt AC 206 ms 28636 KiB
01_random_34.txt AC 271 ms 27200 KiB
01_random_35.txt AC 282 ms 25988 KiB
01_random_36.txt AC 248 ms 25436 KiB
02_handmade_01.txt AC 1 ms 3432 KiB
02_handmade_02.txt AC 1 ms 3568 KiB
02_handmade_03.txt AC 183 ms 6276 KiB
02_handmade_04.txt AC 199 ms 6192 KiB
02_handmade_05.txt AC 211 ms 28516 KiB