/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Wrong Answer 10ms 568.0 KiB
#3 Accepted 12ms 320.0 KiB
#4 Accepted 4ms 532.0 KiB
#5 Accepted 17ms 728.0 KiB
#6 Accepted 18ms 2.02 MiB
#7 Accepted 18ms 2.023 MiB

Code

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define run  ios_base::sync_with_stdio(false);cin.tie(0);

#define ln length()
#define ll long long
#define pll pair<ll, ll>
#define ull unsigned ll
#define ld double
#define endl "\n"
#define pb push_back
#define fi first
#define se second
 
#define pi acos(-1)
#define N 1000006
#define INF 10000000000
#define minimum -9223372036854775807
#define maximum -minimum
#define mod 1000000007
 
using namespace std;
using namespace __gnu_pbds;
template <class t>
using ordered_set=tree<t, null_type,less_equal<t>, rb_tree_tag,tree_order_statistics_node_update>;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

ll gcd(ll a, ll b)
{
	if(b==0)
		return a;
	return gcd(b, a%b);
}

ll lcm(ll a, ll b)
{
	return a/gcd(a, b)*b;
}

bool isprime(ll n)
{
	if(n==1)
		return 0;
	for(ll i=2; i*i<=n; i++)
	{
		if(n%i==0)
			return 0;
	}
	return 1;
}

ll binpow(ll a, ll b)
{
    a%=mod;
    ll res=1;
    while(b>0)
	{
        if(b%2==1)
            res=(res*a)%mod;
        a=(a*a)%mod;
        b/=2;
    }
    return res;
}

int main()
{
	run;
	ll t;
	cin>>t;
	while(t--)
	{
		ll n, m;
		cin>>n>>m;
		ll a[n], b[m];
		set<ll>st1, st2;
		for(ll i=0; i<n; i++)
		{
			cin>>a[i];
			st1.insert(a[i]);
		}
		for(ll i=0; i<m; i++)
		{
			cin>>b[i];
			st2.insert(b[i]);
		}
		if(st1.find(1)!=st1.end() && st1.find(2)!=st1.end() && st1.find(3)!=st1.end() && st2.size()==10)
		{
			cout<<"YES\n";
		}
		else
			cout<<"NO\n";
	}
}
// By Xanlar

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:34:22
Judged At
2025-01-02 14:34:22
Judged By
Score
80
Total Time
18ms
Peak Memory
2.023 MiB