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

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n, m, k;
    cin >> n >> m >> k;
    set<int> s;
    while (k--) {
        int l, r;
        cin >> l >> r;
        s.insert(l);
    }
    cout << s.size() << '\n';
}
Copy
Min Vertex Cover 1 ahmad_salah
GNU G++17
3 ms
496 KB
Wrong Answer