Page 1 of 1

10261 - Failed test cases

Posted: Sat Apr 07, 2007 6:02 am
by hungson175
Hi , I believe that the test case of this problem is failed. The problem statement said :
"For each car in the queue there is an additional line of input specifying the length of the car (in cm, an integer between 100 and 3000 inclusive)"
But when I inserted this line : assert( num >= 100 && num >= 3000 ); into my accepted code , I recieved:
"
Your program has died with signal 6 (SIGABRT). Meaning:
Abort signal from abort()
"
from the judge.

Code: Select all

......
int main() {
	int T,num;
	scanf("%d",&T);
	FOR( test,T ) {
		scanf("%d",&ferrLen);
		ferrLen *= 100;
		n = 0;
		while (scanf("%d",&num)==1) {
			if ( num == 0 ) break;
//			assert( num >= 100 && num >= 3000 );
			A[n++] = num;
		}
		findMax();
		printSolution(test == T-1 ? true : false );
	}
}
......

Posted: Sat Apr 07, 2007 6:25 am
by rio
Your assertion is wrong.

Code: Select all

assert( num >= 100 && num >= 3000 )
sould be

Code: Select all

assert( num >= 100 && num <= 3000 )