/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 340.0 KiB
#2 Accepted 10ms 344.0 KiB
#3 Accepted 8ms 532.0 KiB
#4 Accepted 4ms 764.0 KiB
#5 Accepted 36ms 564.0 KiB
#6 Accepted 15ms 532.0 KiB
#7 Accepted 39ms 536.0 KiB

Code

#include<bits/stdc++.h>
#define ll long long
#define endl "\n"
using namespace std;

int main() {
    ios_base::sync_with_stdio(0);cin.tie(0);
    int t,a,b,x;   cin >> t; 
    while(t--){
        cin >> a >> b;
        map<int,int> m1,m2;
        for(int i=0;i<a;i++){
            cin >> x;
            if(x>=0&&x<=3) m1[x]++;
        }
        for(int i=0;i<b;i++){
            cin >> x;
            m2[x]++;
        }
        m1.size()==4 && m2.size()==10 ? cout << "YES\n" : cout << "NO\n";
    }
  return 0;
}
    

Information

Submit By
Type
Submission
Problem
P1153 Is Date Possible?
Contest
Happy New Year 2025
Language
C++17 (G++ 13.2.0)
Submit At
2025-01-02 14:46:14
Judged At
2025-01-02 14:46:14
Judged By
Score
100
Total Time
39ms
Peak Memory
764.0 KiB