/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 532.0 KiB
#2 Wrong Answer 22ms 560.0 KiB

Code

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

void solve() {
    int n, m; cin >> n >> m;
    unordered_set<int> a, b; 
    for(int i = 0; i < n; i++) {
        int x; cin >> x;
        if(x < 4)
            a.insert(x);
    }
    
    for(int i = 0; i < m; i++) {
        int x; cin >> x;
        b.insert(x);
    }
    
    bool ans = (b.size() == 9 and a.size() == 4);
    
    cout << ((ans) ? "YES\n" : "NO\n");
}

int main() {
    ios::sync_with_stdio(false);    
    cin.tie(nullptr);cout.tie(nullptr);

    int t; cin >> t;
    while(t--)
        solve();
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1153 Is Date Possible?
Language
C++17 (G++ 13.2.0)
Submit At
2025-01-03 18:33:58
Judged At
2025-01-03 18:33:58
Judged By
Score
0
Total Time
22ms
Peak Memory
560.0 KiB