Which test case is my code failing?

I am solving Prom Night. My code passes 3/5 test cases. I want to know the test case it is failing. My code:

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        bool flag = true;
        cin>>m>>n;
        int a[m];
        int b[n];
        for(int i=0;i<m;i++)
            cin>>a[i];
        for(int i=0;i<n;i++)
            cin>>b[i];
        if(n<m)
        {
            cout<<"NO"<<endl;
        }
        else
        {
            sort(a,a+m);
            sort(b,b+n);
            for(int i=0;i<m;i++)
            {
                //cout<<"a[i]: "<<a[i]<<" b[i]"<<b[i]<<endl;
                if(a[i] < b[i])
                {
                    flag = false;
                    break;
                }
            }
            if(flag)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
    }

    return 0;
}

The height should be strictly greater than girls’. So, it should be if(a[i]<=b[i]) in line no. 31 instead of <

1 Like

Oh yes!.. Thanks bro!

Strictly greater means use of “<=” is incorrect. 10 is not strictly greater than 10.