Page 1 of 2
10659 - Fitting Text into Slides
Posted: Sun Jun 27, 2004 7:17 am
by abc
Help with I/O Please!

Posted: Thu Feb 24, 2005 8:28 pm
by Destination Goa
My AC solution does not add spaces after last word in a line even if it's not the last word in a paragraph.
Every paragraph begins with a new line.
X is width, Y is height.
Posted: Tue Mar 22, 2005 5:21 am
by Emilio
Hi!
Can anyone send the output for this, please?
Code: Select all
4
1
abc...
30 100
2
abc,ac
(de)ac
60 100
1
ab,.
30 100
1
a.
28 56
Thanks in advance!
Posted: Tue Mar 22, 2005 9:47 am
by Destination Goa
Posted: Tue Mar 22, 2005 8:51 pm
by Emilio
First, thanks Destination Goa!
I got AC.
My mistake was '\n' == ' ' == isspace, and not are the same, you must respect '\n' of each text.
Posted: Sat Jul 29, 2006 4:14 pm
by daveon
Yes, it is not clear from the problem but each paragraph must start on a new line.
10659 - Fitting Text into Slides (WAing)
Posted: Tue Oct 14, 2008 4:59 pm
by DD
Does anyone can provide more I/O cases? This problem let me feel frustrated .
Re: 10659 - Fitting Text into Slides
Posted: Wed Oct 15, 2008 7:35 pm
by coze
Heres some io test.
Code: Select all
8
1
a a
16 8
1
a a
17 8
1
aaa bbb
25 100
1
aaaa
27 10
1
aaa bbb ccc
24 24
2
aaaaa
bbbb c
100 100
1
a a
23 8
1
a a
9 30
Output:
Code: Select all
No solution
No solution
8
No solution
8
20
No solution
9
Re: 10659 - Fitting Text into Slides
Posted: Sat Oct 18, 2008 1:39 pm
by DD
coze wrote:Heres some io test.
Code: Select all
8
1
a a
16 8
1
a a
17 8
1
aaa bbb
25 100
1
aaaa
27 10
1
aaa bbb ccc
24 24
2
aaaaa
bbbb c
100 100
1
a a
23 8
1
a a
9 30
Output:
Code: Select all
No solution
No solution
8
No solution
8
20
No solution
9
Thanks for your help, coze. Although my program generated the same output results, I still got W.A.
Does anyone can help me test the following input data?
Input:
Code: Select all
2
2
aaaaa
bbbb c
100 40
2
aaaaa
bbbb cc
100 40
Thanks!
Re: 10659 - Fitting Text into Slides
Posted: Sat Oct 18, 2008 6:28 pm
by coze
Re: 10659 - Fitting Text into Slides
Posted: Sun Oct 19, 2008 3:56 am
by DD
Thanks, coze.
It is strange that even my program pass every test case listed in the forum, I still can not get Accepted.
Does anyone can give me more tricky input/output?
P.S. In my program, I set
M to 10000, which I think this value should be big enough.
Re: 10659 - Fitting Text into Slides
Posted: Mon Oct 20, 2008 9:13 am
by coze
Can you show me your source code?
Re: 10659 - Fitting Text into Slides
Posted: Tue Oct 21, 2008 4:00 am
by DD
coze wrote:Can you show me your source code?
Hi coze, my source code are listed, please check it.
Re: 10659 - Fitting Text into Slides
Posted: Tue Oct 21, 2008 7:12 am
by coze
Try this:
input:
your output:
my output:
Re: 10659 - Fitting Text into Slides
Posted: Tue Oct 21, 2008 11:16 am
by DD
coze wrote:Try this:
input:
your output:
my output:
First of all, thanks for your help, coze. But I still got W.A. after fixing the bug which I did not consider before.
Please help me check again, thanks.