/ SeriousOJ /

Record Detail

Compile Error

foo.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.

Code

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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, m;
        cin >> n >> m;
        
        set<int> v, s;
        for (int i = 0; i < n; i++) {
            int a;
            cin >> a;
            v.insert(a);
        }
        for (int i = 0; i < m; i++) {
            int p;
            cin >> p;
            s.insert(p);
        }

        bool common_found = false;
        for (int x : v) {
            if (s.find(x) != s.end()) {
                common_found = true;
                break;
            }
        }

        if (common_found)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1153 Is Date Possible?
Contest
Happy New Year 2025
Language
C99 (GCC 13.2.0)
Submit At
2025-01-02 14:58:39
Judged At
2025-01-02 14:58:39
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes