/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 19ms 348.0 KiB
#3 Accepted 17ms 320.0 KiB
#4 Accepted 4ms 320.0 KiB
#5 Accepted 39ms 532.0 KiB
#6 Accepted 30ms 548.0 KiB
#7 Accepted 30ms 544.0 KiB

Code

#include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
   int a,b;
   cin>>a>>b;
   int count=0;
   int cnt=0;
   std::vector<int>A(10,0) ;
   vector<int>B(10,0);
   for(int i=0;i<a;i++)
   {
       int c;
       cin>>c;
       if(A[c]==0)
       {
            A[c]=1;
            count++;
       }
      
   }
   for(int i=0;i<b;i++)
   {
       int c;
       cin>>c;
       if(B[c]==0)
       {
             B[c]=1;
             cnt++;
       }
     
   }
   if(count==10 && cnt==10)
   {
       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
C++17 (G++ 13.2.0)
Submit At
2025-01-02 15:41:14
Judged At
2025-01-02 15:41:14
Judged By
Score
80
Total Time
39ms
Peak Memory
548.0 KiB