The following is the problem link: TRUEDARE
With the last AC submission on 3 March 2019 and I being unable to figure out any fault in my code, along with AC submissions not giving AC now, is the problem all right?
Please correct me if I am wrong in my approach, which is similar to the one described in the editorials!
My code for TRUEDARE
#include <bits/stdc++.h>
using namespace std;
#define sl(n) scanf("%lld", &n)
#define sf(n) scanf("%lf", &n)
#define si(n) scanf("%d", &n)
#define ss(n) scanf("%s", n)
#define sc(n) scanf("%c", &n)
#define pi(a) printf("%d\n", (a))
#define pl(a) printf("%lld\n", (a))
#define pf(a) printf("%lf\n", (a))
#define pn printf("\n");
#define ps(a) printf(a);
#define MOD 1000000007
typedef long long lld;
int main()
{
int T;
si(T);
while (T--)
{
int tr;
si(tr);
int tok;
unordered_set<int> Tr;
for (int i = 0; i < tr; i++)
{
si(tok);
Tr.insert(tok);
}
int dr;
si(dr);
unordered_set<int> Dr;
for (int i = 0; i < dr; i++)
{
si(tok);
Dr.insert(tok);
}
bool flag = true;
int ts;
si(ts);
int Ts;
for (int i = 0; i < ts; i++)
{
si(Ts);
if (Tr.find(Ts) == Tr.end())
flag = false;
}
int ds;
si(ds);
int Ds;
for (int i = 0; i < ts; i++)
{
si(Ds);
if (Dr.find(Ds) == Dr.end())
flag = false;
}
printf(flag ? "yes\n" : "no\n");
}
}