Accepted
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