10261 - Failed test cases

The forum to report every bug you find or tell us what you'd like to find in UVa OJ

Moderator: Board moderators

Locked
hungson175
New poster
Posts: 2
Joined: Mon Feb 19, 2007 3:34 pm
Contact:

10261 - Failed test cases

Post 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 );
	}
}
......
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Post by rio »

Your assertion is wrong.

Code: Select all

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

Code: Select all

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

Return to “Bugs and suggestions”