403 - Postscript

All about problems in Volume 4. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

emotional blind
A great helper
Posts: 383
Joined: Mon Oct 18, 2004 8:25 am
Location: Bangladesh
Contact:

Post by emotional blind »

JAN
I sent you my code in PM
please check it with some input.
my program gives the same output for your input..
Last edited by emotional blind on Thu Apr 20, 2006 11:58 am, edited 1 time in total.

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Post by Jan »

I haven't found any error. I made a random input file and matched both codes. The outputs were same.

I can send you my exe file if you need it.

In my code I made an array of size 100*100. And the main page is from 20,20 to 80,80. I evaluated all the commands in this section. So, any value outside this range will be truncated automatically. You can try this method.

Hope it works.

Remove suffix from your ID (given in your signature). Otherwise anyone can use your ID as a test account. :wink:
Ami ekhono shopno dekhi...
HomePage

emotional blind
A great helper
Posts: 383
Joined: Mon Oct 18, 2004 8:25 am
Location: Bangladesh
Contact:

Post by emotional blind »

Thanks JAN
now i need your exe file,
thanks in advance

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Post by Jan »

I have sent it in your yahoo mail.

Hope it helps.
Ami ekhono shopno dekhi...
HomePage

emotional blind
A great helper
Posts: 383
Joined: Mon Oct 18, 2004 8:25 am
Location: Bangladesh
Contact:

Post by emotional blind »

thanks JAN
i shall try again now

i see u are from DU,
are u the member of world finalist team?

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Post by Jan »

No, I m not the member of the world finalist team.
Ami ekhono shopno dekhi...
HomePage

emotional blind
A great helper
Posts: 383
Joined: Mon Oct 18, 2004 8:25 am
Location: Bangladesh
Contact:

Post by emotional blind »

Jan I have found difference between ur output and output of me
for this input

Code: Select all

.C C5 3 |ACM| 
.C C5 9 |     A     |
.C C1 10 |SOUTH CENTRAL REGION PROBLEM FOUR SAMPLE OUTPUT| 
.C C5 9 |     A     |
.C C5 9 |          |
.C C5 20 |OVERFLOW CENTERED LARGE FONT| 
.C C5 20 |ACM| 
.P C1 33 11 |LINE THAT OVERWRITES THROUGH CENTERED| 
.C C5 30 |CENTERED|    
.R C1 40 |SMALL FONT LINE IS LEFT JUSTIFIED ON ROW FORTY SMALL FONT LINE IS LEFT JUSTIFIED ON ROW FORTY| 
.C C1 40 |ARIF  | 
.C C1 41 |ARI| 
.C C1 42 |AR|
.C C1 44 |FKKKKKKKKK5454KKKKKKKKK|
.C C1 45 |Jflkdasjfa;ljd|
.P C1 46 20|jklkdasjfa;ljd|
.C C1 47 |j|
.C C1 48 |J|
.P C1 49 20 |j|
.R C5 50 |RIGHT AND WORK| 
.P C5 10 60 |ARONUD A LITTLE BIT|
.P C5 56 10 |BOTTOM AND RIGHT TRUNCATION| 
.EOP 


.EOP
output of my wa code
403A.out

Code: Select all

............................................................
............................................................
......................***...****.*...*......................
.....................*...*.*...*.**.**......................
.....................*****.*.....*.*.*......................
.....................*...*.*.....*...*......................
.....................*...*..****.*...*......................
............................................................
............................***.............................
.......SOUTH.CENTRAL.REGION*PRO*LEM.FOUR.SAMPLE.OUTPUT......
...........................*****...........................*
...........................*...*...........................*
...........................*...*...........................*
...........................................................*
............................................................
............................................................
............................................................
............................................................
............................................................
.****.*****.*...*.****************..*****.****........*.....
*...*.*.....**..*.*.***.**.*..**.**.**....*...*.......*.....
*.....***...*.*.*...********..****.****...*...*.......*.....
*.....*.....*..**...**..**.*..*..*..**....*...*.......*.....
.****.*****.*...*..***..********.**.*****.****........*****.
............................................................
............................................................
............................................................
............................................................
............................................................
.......****.*****.*...*.*****.*****.****..*****.****........
......*...*.*.....**..*.*.*.*.*.....*...*.*.....*...*.......
......*.....***...*.*.*...*...***...****..***...*...*.......
......*...LI*E.THA*.O**RWR*TES*THROU*H.*EN*ERED.*...*.......
.......****.*****.*...*..***..*****.*...*.*****.****........
............................................................
............................................................
............................................................
............................................................
............................................................
.ON.ROW.FORTY.SMALL.FONT.LIARIFS.LEFT.JUSTIFIED.ON.ROW.FORTY
.............................ARI............................
.............................AR.............................
............................................................
...................FKKKKKKKKK5454KKKKKKKKK..................
.......................Jflkdasjfa;ljd.......................
...................jklkdasjfa;ljd...........................
..............................j.............................
..............................J.............................
...................j........................................
*****........***..*...*.****........*...*..***..****..*...*.
*.*.*.......*...*.**..*.*...*.......*...*.*...*.*...*.*..*..
..*.........*****.*.*.*.*...*.......*.*.*.*...*.****..***...
..*.........*...*.*..**.*...*.......**.**.*...*.*..*..*..*..
.***........*...*.*...*.****........*...*..***..*...*.*...*.
............................................................
.........****...***..*****.*****..***..*...*........***..*..
.........*...*.*...*.*.*.*.*.*.*.*...*.**.**.......*...*.**.
.........****..*...*...*.....*...*...*.*.*.*.......*****.*.*
.........*...*.*...*...*.....*...*...*.*...*.......*...*.*..
.........****...***...***...***...***..*...*.......*...*.*..

------------------------------------------------------------

............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................

------------------------------------------------------------

output of your accepted code
403.out

Code: Select all

............................................................
............................................................
......................***...****.*...*......................
.....................*...*.*...*.**.**......................
.....................*****.*.....*.*.*......................
.....................*...*.*.....*...*......................
.....................*...*..****.*...*......................
............................................................
............................***.............................
.......SOUTH.CENTRAL.REGION*PRO*LEM.FOUR.SAMPLE.OUTPUT......
...........................*****...........................*
...........................*...*...........................*
...........................*...*...........................*
...........................................................*
............................................................
............................................................
............................................................
............................................................
............................................................
.****.*****.*...*.****************..*****.****........*.....
*...*.*.....**..*.*.***.**.*..**.**.**....*...*.......*.....
*.....***...*.*.*...********..****.****...*...*.......*.....
*.....*.....*..**...**..**.*..*..*..**....*...*.......*.....
.****.*****.*...*..***..********.**.*****.****........*****.
............................................................
............................................................
............................................................
............................................................
............................................................
.......****.*****.*...*.*****.*****.****..*****.****........
......*...*.*.....**..*.*.*.*.*.....*...*.*.....*...*.......
......*.....***...*.*.*...*...***...****..***...*...*.......
......*...LI*E.THA*.O**RWR*TES*THROU*H.*EN*ERED.*...*.......
.......****.*****.*...*..***..*****.*...*.*****.****........
............................................................
............................................................
............................................................
............................................................
............................................................
.ON.ROW.FORTY.SMALL.FONT.LIARIFS.LEFT.JUSTIFIED.ON.ROW.FORTY
.............................ARI............................
.............................AR.............................
............................................................
...................FKKKKKKKKK..54KKKKKKKKK..................
.......................J......jfa;ljd.......................
...................jklkdasjfa;ljd...........................
............................................................
..............................J.............................
...................j........................................
*****........***..*...*.****........*...*..***..****..*...*.
*.*.*.......*...*.**..*.*...*.......*...*.*...*.*...*.*..*..
..*.........*****.*.*.*.*...*.......*.*.*.*...*.****..***...
..*.........*...*.*..**.*...*.......**.**.*...*.*..*..*..*..
.***........*...*.*...*.****........*...*..***..*...*.*...*.
............................................................
.........****...***..*****.*****..***..*...*........***..*..
.........*...*.*...*.*.*.*.*.*.*.*...*.**.**.......*...*.**.
.........****..*...*...*.....*...*...*.*.*.*.......*****.*.*
.........*...*.*...*...*.....*...*...*.*...*.......*...*.*..
.........****...***...***...***...***..*...*.......*...*.*..

------------------------------------------------------------

............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................

------------------------------------------------------------

File compare shows the difference here

Code: Select all

Comparing files 403.OUT and 403A.OUT
***** 403.OUT
............................................................
...................FKKKKKKKKK..54KKKKKKKKK..................
.......................J......jfa;ljd.......................
...................jklkdasjfa;ljd...........................
............................................................
..............................J.............................
***** 403A.OUT
............................................................
...................FKKKKKKKKK5454KKKKKKKKK..................
.......................Jflkdasjfa;ljd.......................
...................jklkdasjfa;ljd...........................
..............................j.............................
..............................J.............................
*****

i dont understand why my output is wrong

chunyi81
A great helper
Posts: 293
Joined: Sat Jun 21, 2003 4:19 am
Location: Singapore

Post by chunyi81 »

emotional blind, my AC code actually seg faults with your input. You can assume input is formatted correctly as described in the sample input and no blank lines.

I ran the following input (it's the same as yours but removing blank lines and adding a space to avoid the seg fault.

Code: Select all

.C C5 3 |ACM| 
.C C5 9 |     A     | 
.C C1 10 |SOUTH CENTRAL REGION PROBLEM FOUR SAMPLE OUTPUT| 
.C C5 9 |     A     | 
.C C5 9 |          | 
.C C5 20 |OVERFLOW CENTERED LARGE FONT| 
.C C5 20 |ACM| 
.P C1 33 11 |LINE THAT OVERWRITES THROUGH CENTERED| 
.C C5 30 |CENTERED|    
.R C1 40 |SMALL FONT LINE IS LEFT JUSTIFIED ON ROW FORTY SMALL FONT LINE IS LEFT JUSTIFIED ON ROW FORTY| 
.C C1 40 |ARIF  | 
.C C1 41 |ARI| 
.C C1 42 |AR| 
.C C1 44 |FKKKKKKKKK5454KKKKKKKKK| 
.C C1 45 |Jflkdasjfa;ljd| 
.P C1 46 20 |jklkdasjfa;ljd| 
.C C1 47 |j| 
.C C1 48 |J| 
.P C1 49 20 |j| 
.R C5 50 |RIGHT AND WORK| 
.P C5 10 60 |ARONUD A LITTLE BIT| 
.P C5 56 10 |BOTTOM AND RIGHT TRUNCATION| 
.EOP 
.EOP
And I got the following output which is different from the output from Jan's AC code. You might want to compare and decide which should be the correct output.

Code: Select all

............................................................
............................................................
......................***...****.*...*......................
.....................*...*.*...*.**.**......................
.....................*****.*.....*.*.*......................
.....................*...*.*.....*...*......................
.....................*...*..****.*...*......................
............................................................
............................***.............................
.......SOUTH.CENTRAL.REGION*...*.EM.FOUR.SAMPLE.OUTPUT......
...........................*****...........................*
...........................*...*...........................*
...........................*...*...........................*
...........................................................*
............................................................
............................................................
............................................................
............................................................
............................................................
.****.*****.*...*.***.***...****.*...*.**.****........*.....
*...*.*.....**..*.*.**...*.*...*.**.**....*...*.......*.....
*.....***...*.*.*...******.*.....*.*.*....*...*.......*.....
*.....*.....*..**...**...*.*.....*...*....*...*.......*.....
.****.*****.*...*..***...*..****.*...*.**.****........*****.
............................................................
............................................................
............................................................
............................................................
............................................................
.......****.*****.*...*.*****.*****.****..*****.****........
......*...*.*.....**..*.*.*.*.*.....*...*.*.....*...*.......
......*.....***...*.*.*...*...***...****..***...*...*.......
......*.....*.....*..**...*...*.....*..*..*.....*...*.......
.......****.*****.*...*..***..*****.*...*.*****.****........
............................................................
............................................................
............................................................
............................................................
...........................SMALL.FONT.LINE.IS.LEFT.JUSTIFIED
.ON.ROW.FORTY.SMALL.FONT.LIARIFS.LEFT.JUSTIFIED.ON.ROW.FORTY
.............................ARI............................
.............................AR.............................
............................................................
...................FKKKKKKKKK5454KKKKKKKKK..................
.......................Jflkdasjfa;ljd.......................
...................jklkdasjfa;ljd...........................
..............................j.............................
..............................J.............................
...................j........................................
*****........***..*...*.****........*...*..***..****..*...*.
*.*.*.......*...*.**..*.*...*.......*...*.*...*.*...*.*..*..
..*.........*****.*.*.*.*...*.......*.*.*.*...*.****..***...
..*.........*...*.*..**.*...*.......**.**.*...*.*..*..*..*..
.***........*...*.*...*.****........*...*..***..*...*.*...*.
............................................................
.........****...***..*****.*****..***..*...*........***..*..
.........*...*.*...*.*.*.*.*.*.*.*...*.**.**.......*...*.**.
.........****..*...*...*.....*...*...*.*.*.*.......*****.*.*
.........*...*.*...*...*.....*...*...*.*...*.......*...*.*..
.........****...***...***...***...***..*...*.......*...*.*..

------------------------------------------------------------

............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................

------------------------------------------------------------

From the output from Jan's AC code and the output from my AC code, there seems to be a difference interpreting what happens when a C5 letter appears on top of another C5 letter. Also you can assume that all strings to be printed are at most 60 characters not including the NULL character. One of your inputs has a string > 60 characters and my code does not cater for that.

emotional blind
A great helper
Posts: 383
Joined: Mon Oct 18, 2004 8:25 am
Location: Bangladesh
Contact:

Post by emotional blind »

strange looking,
chunyi81,
i am getting WA so many times
some of my code outputs as like u?
i also get wa on those..
i sent u two of those to u in PM..

if u can find any difference i will be greatful to u..

songyy
New poster
Posts: 2
Joined: Mon Jan 17, 2011 5:44 pm

Re: 403- need some help

Post by songyy »

@emotional bland:
I got exactly the same output with you, and I think your output is correct.

But I got WA also... don't understand why getting WA...
What doesn't kills you makes you stronger.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 403- need some help

Post by brianfry713 »

Input:

Code: Select all

.C C5 1 |ABCDEFGHIJ|
.C C5 10 |ABCDEFGHIJK|
.C C5 20 |ABCDEFGHIJKL|
.R C5 30 |ABCDEFGHIJK|
.L C5 40 |ABCDEFGHIJKL|
.EOP
AC output:

Code: Select all

.***..****...****.****..*****.*****..****.*...*.*****...***.
*...*.*...*.*...*.*...*.*.....*.....*.....*...*...*......*..
*****.****..*.....*...*.***...***...*..**.*****...*......*..
*...*.*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..
*...*.****...****.****..*****.*......***..*...*.*****..**...
............................................................
............................................................
............................................................
............................................................
*..****...****.****..*****.*****..****.*...*.*****...***.*..
.*.*...*.*...*.*...*.*.....*.....*.....*...*...*......*..*..
**.****..*.....*...*.***...***...*..**.*****...*......*..***
.*.*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..*..
.*.****...****.****..*****.*......***..*...*.*****..**...*..
............................................................
............................................................
............................................................
............................................................
............................................................
****...****.****..*****.*****..****.*...*.*****...***.*...*.
*...*.*...*.*...*.*.....*.....*.....*...*...*......*..*..*..
****..*.....*...*.***...***...*..**.*****...*......*..***...
*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..*..*..
****...****.****..*****.*......***..*...*.*****..**...*...*.
............................................................
............................................................
............................................................
............................................................
............................................................
****...****.****..*****.*****..****.*...*.*****...***.*...*.
*...*.*...*.*...*.*.....*.....*.....*...*...*......*..*..*..
****..*.....*...*.***...***...*..**.*****...*......*..***...
*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..*..*..
****...****.****..*****.*......***..*...*.*****..**...*...*.
............................................................
............................................................
............................................................
............................................................
............................................................
.***..****...****.****..*****.*****..****.*...*.*****...***.
*...*.*...*.*...*.*...*.*.....*.....*.....*...*...*......*..
*****.****..*.....*...*.***...***...*..**.*****...*......*..
*...*.*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..
*...*.****...****.****..*****.*......***..*...*.*****..**...
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................

------------------------------------------------------------

Check input and AC output for thousands of problems on uDebug!

kukker
New poster
Posts: 5
Joined: Fri Feb 28, 2014 6:39 pm

Re: 403- need some help

Post by kukker »

I also get WA, but don't know why.
Someone, whose answer is accepted could specify the ouput for this?

Code: Select all

.C C5 10 |ACM|
.C C5 12 |TEST TEXT|
.L C1 20 |SOME MESSAGE|
.L C5 18 |OTHER THING|
.P C5 32 3 |OWERWRITTEN MESSAGE|
.P C1 35 5 |NEED ANSWER|
.EOP
My code generates the following output (with WA!):

Code: Select all

............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
......................***...****.*...*......................
.....................*...*.*...*.**.**......................
...*****.*****..****.*****.*.....*****.*****.*...*.*****....
...*.*.*.*.....*.....*.*.*.*.....*.*.*.*......*.*..*.*.*....
.....*...***....***..*.*.*..****.*.*.*.***.....*.....*......
.....*...*.........*...*...........*...*......*.*....*......
....***..*****.****...***.........***..*****.*...*..***.....
............................................................
.***..*****.*...*.*****.****........*****.*...*.*****.*...*.
*...*.*.*.*.*...*.*.....*...*.......*.*.*.*...*...*...**..*.
*OME*MES*AGE*****.***...****..........*...*****...*...*.*.*.
*...*...*...*...*.*.....*..*..........*...*...*...*...*..**.
.***...***..*...*.*****.*...*........***..*...*.*****.*...*.
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
...***..*...*.*****.****..*...*.****..*****.*****.*****.****
..*...*.*...*.*.....*...*.*...*.*...*...*...*.*.*.*.*.*.*...
..*...*.*.*.*.***...****..*.*.*.****....*.....*.....*...***.
..*.NEED*ANSWER.....*..*..**.**.*..*....*.....*.....*...*...
...***..*...*.*****.*...*.*...*.*...*.*****..***...***..****
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................

------------------------------------------------------------

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 403- need some help

Post by brianfry713 »

AC output for your input

Code: Select all

............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
......................***...****.*...*......................
.....................*...*.*...*.**.**......................
...*****.*****..****.*****.*.....*****.*****.*...*.*****....
...*.*.*.*.....*.....*.*.*.*.....*.*.*.*......*.*..*.*.*....
.....*...***....***....*....****...*...***.....*.....*......
.....*...*.........*...*...........*...*......*.*....*......
....***..*****.****...***.........***..*****.*...*..***.....
............................................................
.***..*****.*...*.*****.****........*****.*...*.*****.*...*.
*...*.*.*.*.*...*.*.....*...*.......*.*.*.*...*...*...**..*.
*...*...*...*****.***...****..........*...*****...*...*.*.*.
*...*...*...*...*.*.....*..*..........*...*...*...*...*..**.
.***...***..*...*.*****.*...*........***..*...*.*****.*...*.
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
...***..*...*.*****.****..*...*.****..*****.*****.*****.****
..*...*.*...*.*.....*...*.*...*.*...*...*...*.*.*.*.*.*.*...
..*...*.*.*.*.***...****..*.*.*.****....*.....*.....*...***.
..*.NEED*ANSWER.....*..*..**.**.*..*....*.....*.....*...*...
...***..*...*.*****.*...*.*...*.*...*.*****..***...***..****
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................

------------------------------------------------------------

Check input and AC output for thousands of problems on uDebug!

kukker
New poster
Posts: 5
Joined: Fri Feb 28, 2014 6:39 pm

Re: 403- need some help

Post by kukker »

Thank you for replying. I modified my code so it produces the same output as yours but still WA. There is something that I am missing...

Post Reply

Return to “Volume 4 (400-499)”