hello everybody,
this is abt the problem ---NSTEPS.-- the one tat is killing me!!!
this is the code .... Can anybody help me figure out where I cud b wrong????
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int a,x,y;
vector<int> b;
cin>>a;
b.resize(a);
for(int i=0;i<a;i++)
{
cin>>x>>y;
if(x<=10000 && y<=10000)
{
if(x%2==0 && (y-x==2 || y-x==0))
{
b[i]=x+y;
}
else if(x%2==1 && (y-x==2 || y-x==0))
{
b[i]=x+y-1;
}
else
{
b[i]=-1;
}
}
}
cout<<"\n";
for(int i=0;i<a;i++)
{
if(b[i]>=0)
{
cout<<b[i]<<"\n";
}
else if(b[i]=-1)
{
cout<<"No Number\n";
}
}
return 0;
}