So this is thr first question of november cookoff 2018 truth and dare
My solution is
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
ios_base::sync_with_stdio(false);
cin >> t;
while (t--)
{
cin.tie(NULL);
bool opa = false, opb = false;
int tr, dr, ts, ds;
set<int> ho, d;
cin >> tr;
for (int i = 0;i < tr;++i)
{
int inp;
cin >> inp;
if (ho.find(inp) == ho.end())
ho.insert(inp);
}
cin >> dr;
for (int i = 0;i < dr;++i)
{
int inp;
cin >> inp;
if (d.find(inp) == d.end())
d.insert(inp);
}
cin >> ts;
for (int i = 0;i < ts;++i)
{
int inp;
cin >> inp;
if (ho.find(inp) != ho.end())
opa = true;
else
{
opa = false;
break;
}
}
cin >> ds;
for (int i = 0;i < ds;++i)
{
int inp;
cin >> inp;
if (d.find(inp) != d.end())
opb = true;
else
{
opb = false;
break;
}
}
(opa && opb) ? cout << "yes" << endl :
cout << "no" << endl;
}
return 0;
}
But i am getting WA why?
Thank you in advance.