i m getting wrong answer...........
not getting my mistake
include
using namespace std;
struct list
{
long long info;
list *link;
}start=NULL,temp,s,r;
void insert()
{
temp=new list;
cin>>temp->info;
temp->link=NULL;
if(start==NULL)
start=temp;
else
{
r=NULL;
for(s=start;s!=NULL&&(s->infoinfo);s=s->link)
{
r=s;
}
if(r==NULL)
{
temp->link=start;
start=temp;
}
else
{
r->link=temp;
temp->link=s;
}
}
}
/*void display()
{
for(temp=start;temp!=NULL;temp=temp->link)
cout<info<<" ";
}*/
int main()
{
long long n;
do
{
cin>>n;
if(n==0)
break;
for(int i=0;i insert();
//display();
//cin.get();
//cin.get();
long long miles=200;
for(temp=start;temp!=NULL&&temp->info<=miles;temp=temp->link)
{
s=temp;
miles=temp->info+200;
}
cout<<" "< if(miles>=1422&&(1422-s->info)<=miles-1422)
cout<<"POSSIBLE"< else
cout<<"IMPOSSIBLE"< }
while(5);
//cin.get();
//cin.get();
return 0;
}