10026 - Shoemaker's Problem
Moderator: Board moderators
-
- New poster
- Posts: 6
- Joined: Sat Oct 06, 2007 4:30 am
- Contact:
-
- New poster
- Posts: 6
- Joined: Sat Oct 06, 2007 4:30 am
- Contact:
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...)
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.
Code: Select all
...
Last edited by ddddcccc30 on Tue Oct 09, 2007 7:00 am, edited 1 time in total.
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.
1. Don't print a space after any line. The sample output is
Code: Select all
2.1.3.4
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.
Ami ekhono shopno dekhi...
HomePage
HomePage
-
- New poster
- Posts: 6
- Joined: Sat Oct 06, 2007 4:30 am
- Contact:
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.
But I changed my code, I hope I guess right.
Code: Select all
. . .
Last edited by ddddcccc30 on Tue Oct 09, 2007 2:07 pm, edited 1 time in total.
Check the set carefully.
Input:
Output:
Where '^' represents a newline character. Hope these help.
Input:
Code: Select all
2
4
3 4
1 1000
2 2
5 5
4
3 4
1 1000
2 2
5 5
Code: Select all
2 1 3 4^
^
2 1 3 4^
Ami ekhono shopno dekhi...
HomePage
HomePage
-
- New poster
- Posts: 6
- Joined: Sat Oct 06, 2007 4:30 am
- Contact:
I am sorry to trouble you a lot.
But I still get W.A.
I am now wondering if my answer is really wrong.
But I still get W.A.
![:evil:](./images/smilies/icon_evil.gif)
I am now wondering if my answer is really wrong.
Code: Select all
. . .
Last edited by ddddcccc30 on Wed Oct 10, 2007 4:35 am, edited 1 time in total.
Your code is correct now! Just read the description again. Your code can overflow. So, change the following parts.
Hope these help.
Code: Select all
long long paymoney(int);
...
long long flag,newflag;
...
long long paymoney(int a)
{ long long i,sumdays=0,sum;
...
}
Ami ekhono shopno dekhi...
HomePage
HomePage
-
- New poster
- Posts: 6
- Joined: Sat Oct 06, 2007 4:30 am
- Contact:
-
- New poster
- Posts: 4
- Joined: Thu Oct 25, 2007 3:00 pm
-
- New poster
- Posts: 4
- Joined: Thu Oct 25, 2007 3:00 pm
Code: Select all
. . .
Last edited by cz.guardian on Sat Oct 27, 2007 4:51 am, edited 7 times in total.
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.
Ami ekhono shopno dekhi...
HomePage
HomePage
-
- New poster
- Posts: 4
- Joined: Thu Oct 25, 2007 3:00 pm