Sherlock and Array

  • + 1 comment

    include

    include

    include

    include

    include

    using namespace std;

    int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */
    int t; cin>>t; for(int i=0;i>n; int a[200005]; for(int k=0;k>a[k]; } int flag=0; for(int k=0;k

        }
        if(flag==1)
            cout<<"YES"<<"\n";
        else
            cout<<"NO"<<"\n";
    }
    return 0;
    

    }

    This is my code... Failing test case 3 and 4 due to time out.Kindly help.