[cpp]void main()
{
#ifdef ONLINE_JUDGE
FILE *fp=stdin;
#else
FILE *fp=fopen("b.in","r");
#endif
int n,p,t;
int i;
char l;
int j;
char buf[100];
fgets(buf,100,fp);
sscanf(buf,"%d",&j);
fgets(buf,100,fp);
while(j>0)
{
//......initializations
while(1)
{
if(!fgets(buf,100,fp))
break;
if(buf[0]=='\n')
break;
sscanf(buf,"%d %d %d %c",&n,&p,&t,&l);
//.....real things
}
printf("\n");
j--;
}
}[/cpp]
I've already got four wrong answers for this.
