can anyone give me some more test cases beacuse my all test cases are right still it says wrong answer.


#1

#include
#define lli long long int
using namespace std;

int main()
{
lli t;
cin>>t;
while(t–)
{
lli n,minx,maxx;
cin>>n>>minx>>maxx;
lli w[n],b[n],a=(-1),p,temp=0;
for(lli i=0;i<n;i++)
{
cin>>w*>>b*;
}
for(lli i=n-1;i>=0;i–)
{
if(temp==0)
{
if((w*%2==0)&&(b*%2==0))
{
a=(maxx-minx+1);

          break;
      }
      if((w*%2==0)&&(b*%2!=0))
       {
          a=0;
          
          break;
      }
      if((w*%2!=0)&&(b*%2!=0))
      {
          temp=1;
      }
      if((w*%2!=0)&&(b*%2==0))
      {
          temp=0;
      }
       }
       if(temp==1)
       {
        if((w*%2==0)&&(b*%2==0))
      {
          a=0;
          break;
      }
      if(((w*%2)==0)&&((b*%2)!=0))
       {
          a=(maxx-minx+1);
          break;
      }
      if(((w*%2)!=0)&&((b*%2)!=0))
      {
          temp=1;
      }
      if(((w*%2)!=0)&&((b*%2)==0))
      {
          temp=0;
      }
       } 
       
       }
       if(a==(-1))
       {
           if(temp==0)
           {
               if(((maxx%2)==0)&&((minx%2)==0))
               a=((maxx-minx+2)/2);
               else if(((maxx%2)!=0)&&((minx%2)!=0))
                a=((maxx-minx)/2);
                else
                 a=((maxx-minx+1)/2);
           }
            if(temp==1)
           {
               if(((maxx%2)!=0)&&((minx%2)!=0))
               a=((maxx-minx+2)/2);
               else if((maxx%2==0)&&(minx%2==0))
                a=((maxx-minx)/2);
                else
                 a=((maxx-minx+1)/2);
           }
       }
p=(maxx-minx+1-a);

cout<<a<<" "<<p<<endl;
}
return 0;
}


#2

It’s difficult to help unless you say which question you are working on. But I’m guessing it’s SPAMCLAS.

Try these:

2
2 1 5
3 4
1 3
3 2 10
3 3
1 2
5 1

Output

3 2
5 4

#3

Yes Can u plz Specify question