Help required in TRUEDARE (beginner)!

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");
    }
}

use ds instead of ts in the last loop …

       for (int i = 0; i < ts; i++)

Did that too: Solution ID 23759822

Still a WA. Is there a fault in my logic?

logic is perfect bro …
i too get confused why its getting WA

I think there is something wrong with the problem, like the test cases were messed up or something. The last AC submission is on 6 March from All Languages. All submissions after that are TLE or WA.

@vijju123 Asking for your help here!

1 Like

Looking into it. Will get back to you soon.