Page 3 of 6
Posted: Tue Oct 02, 2007 4:57 pm
by Marcelo
Ok!
Posted: Sun Oct 07, 2007 4:42 am
by ddddcccc30
I have tried the test datas , ans I had right answers.
But I don't know whyI still have W.A.
Should I post my code?
Posted: Sun Oct 07, 2007 9:13 pm
by Jan
Yes.
Posted: Mon Oct 08, 2007 4:50 pm
by ddddcccc30
Thank you so much!
If my thinking is approximately right ,you can just give me some examples that my program would return wrong answers.
I think I could try to find the mistakes by myself.
(Sorry,I am not good at speaking or writing English...)
Posted: Mon Oct 08, 2007 6:57 pm
by Jan
Your code looks correct. But you have some wrong in your output.
1. Don't print a space after any line. The sample output is
here '.' represents a space.
2. The outputs of two consecutive cases will be separated by a blank line. But your are printing a blank line after every case.
Hope these help.
Posted: Tue Oct 09, 2007 6:59 am
by ddddcccc30
I am sorry, I don't completely understand your second point.(I know that's what the problem says.)
But I changed my code, I hope I guess right.
Posted: Tue Oct 09, 2007 12:10 pm
by Jan
Check the set carefully.
Input:
Code: Select all
2
4
3 4
1 1000
2 2
5 5
4
3 4
1 1000
2 2
5 5
Output:
Where '^' represents a newline character. Hope these help.
Posted: Tue Oct 09, 2007 2:06 pm
by ddddcccc30
I am sorry to trouble you a lot.
But I still get W.A.
I am now wondering if my answer is really wrong.
Posted: Tue Oct 09, 2007 4:43 pm
by Jan
Your code is correct now! Just read the description again. Your code can overflow. So, change the following parts.
Code: Select all
long long paymoney(int);
...
long long flag,newflag;
...
long long paymoney(int a)
{ long long i,sumdays=0,sum;
...
}
Hope these help.
Posted: Wed Oct 10, 2007 4:43 am
by ddddcccc30
Thank you so much~
Overflow...
Anyway, thank you. I finally got Accepted.
Posted: Thu Oct 25, 2007 3:03 pm
by cz.guardian
Hi there, i've a little problem with my code. Every single result is fine but still have WA. I dunno why. If is it possible can i post my code??
Posted: Thu Oct 25, 2007 5:19 pm
by Jan
You can post your code.
Posted: Thu Oct 25, 2007 6:15 pm
by cz.guardian
Posted: Thu Oct 25, 2007 10:13 pm
by Jan
Read the i/o specifications again. Your code can't pass the samples.
The input begins with a single positive integer on a line by itself indicating the number of the cases following, each of them as described below. This line is followed by a blank line, and there is also a blank line between two consecutive inputs.
Posted: Thu Oct 25, 2007 11:53 pm
by cz.guardian
Yeah, I wasn't sure if it is input or just a newline. Thx but still can't pass (I tried this option even before)