Page 2 of 2

Re: problem 347 WAAAA!!!!!!!

Posted: Tue Feb 18, 2014 2:34 pm
by uDebug
well I don't know what happened on my code
I always got WA
but I can't find out where my problem is,format? Or something I miss?
I don't know
pls someone for help!!!!!
Looks like all you need to do is perhaps change Line #87 from

Code: Select all

 printf("case %d: ",cases);
to

Code: Select all

 printf("Case %d: ",cases);
The word "case" is spelled with a capital C - so

Case

Not

case

Re: problem 347 WAAAA!!!!!!!

Posted: Tue Feb 18, 2014 2:43 pm
by uDebug
Here's some input / output I found useful during testing / debugging.

Note that the time limit for this problem is 3 seconds. So be wary of the efficiency of your program.

Input:

Code: Select all

1111111
666666
555555
999999
888888
777777
10
248798
9000000
9000000
9000000
9000000
9000000
9000000
9000000
0
AC Output:

Code: Select all

Case 1: 1246895
Case 2: 734259
Case 3: 591342
Case 4: 1246895
Case 5: 895314
Case 6: 794253
Case 7: 13
Case 8: 253194
Case 9: 9415268
Case 10: 9415268
Case 11: 9415268
Case 12: 9415268
Case 13: 9415268
Case 14: 9415268
Case 15: 9415268

Re: problem 347 WAAAA!!!!!!!

Posted: Thu Feb 20, 2014 9:50 am
by bobSHIH
v1n1t wrote: Looks like all you need to do is perhaps change Line #87 from

Code: Select all

 printf("case %d: ",cases);
to

Code: Select all

 printf("Case %d: ",cases);
The word "case" is spelled with a capital C - so

Case

Not

case
ooooooh~
i cant believe i make a so stupid mistake
THANK YOU FOR YOUR HELP
:D

btw i got AC without TLE

Re: problem 347 WAAAA!!!!!!!

Posted: Thu Feb 20, 2014 9:53 am
by uDebug
bobSHIH wrote:btw i got AC without TLE
Wonderful! Well done!

Re: 347 - Run

Posted: Thu Jan 08, 2015 5:11 am
by matheusdallrosa
i don't know why i'm getting TLE, i tested with all numbers in 10...9999999 and no one of the tests became in infinite loop.

code:

Code: Select all

got AC
I don't know where is the performance problem. Please help-me?

Re: 347 - Run

Posted: Thu Jan 08, 2015 3:34 pm
by lighted
Generate all run around numbers. Then for each query you can do binary or linear search.