403 - Postscript
Moderator: Board moderators
-
- A great helper
- Posts: 383
- Joined: Mon Oct 18, 2004 8:25 am
- Location: Bangladesh
- Contact:
JAN
I sent you my code in PM
please check it with some input.
my program gives the same output for your input..
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.
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.
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.

Ami ekhono shopno dekhi...
HomePage
HomePage
-
- A great helper
- Posts: 383
- Joined: Mon Oct 18, 2004 8:25 am
- Location: Bangladesh
- Contact:
-
- A great helper
- Posts: 383
- Joined: Mon Oct 18, 2004 8:25 am
- Location: Bangladesh
- Contact:
-
- A great helper
- Posts: 383
- Joined: Mon Oct 18, 2004 8:25 am
- Location: Bangladesh
- Contact:
Jan I have found difference between ur output and output of me
for this input
output of my wa code
403A.out
output of your accepted code
403.out
File compare shows the difference here
i dont understand why my output is wrong
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
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........................................
*****........***..*...*.****........*...*..***..****..*...*.
*.*.*.......*...*.**..*.*...*.......*...*.*...*.*...*.*..*..
..*.........*****.*.*.*.*...*.......*.*.*.*...*.****..***...
..*.........*...*.*..**.*...*.......**.**.*...*.*..*..*..*..
.***........*...*.*...*.****........*...*..***..*...*.*...*.
............................................................
.........****...***..*****.*****..***..*...*........***..*..
.........*...*.*...*.*.*.*.*.*.*.*...*.**.**.......*...*.**.
.........****..*...*...*.....*...*...*.*.*.*.......*****.*.*
.........*...*.*...*...*.....*...*...*.*...*.......*...*.*..
.........****...***...***...***...***..*...*.......*...*.*..
------------------------------------------------------------
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
------------------------------------------------------------
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........................................
*****........***..*...*.****........*...*..***..****..*...*.
*.*.*.......*...*.**..*.*...*.......*...*.*...*.*...*.*..*..
..*.........*****.*.*.*.*...*.......*.*.*.*...*.****..***...
..*.........*...*.*..**.*...*.......**.**.*...*.*..*..*..*..
.***........*...*.*...*.****........*...*..***..*...*.*...*.
............................................................
.........****...***..*****.*****..***..*...*........***..*..
.........*...*.*...*.*.*.*.*.*.*.*...*.**.**.......*...*.**.
.........****..*...*...*.....*...*...*.*.*.*.......*****.*.*
.........*...*.*...*...*.....*...*...*.*...*.......*...*.*..
.........****...***...***...***...***..*...*.......*...*.*..
------------------------------------------------------------
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
------------------------------------------------------------
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.............................
*****
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.
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.
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.
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
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........................................
*****........***..*...*.****........*...*..***..****..*...*.
*.*.*.......*...*.**..*.*...*.......*...*.*...*.*...*.*..*..
..*.........*****.*.*.*.*...*.......*.*.*.*...*.****..***...
..*.........*...*.*..**.*...*.......**.**.*...*.*..*..*..*..
.***........*...*.*...*.****........*...*..***..*...*.*...*.
............................................................
.........****...***..*****.*****..***..*...*........***..*..
.........*...*.*...*.*.*.*.*.*.*.*...*.**.**.......*...*.**.
.........****..*...*...*.....*...*...*.*.*.*.......*****.*.*
.........*...*.*...*...*.....*...*...*.*...*.......*...*.*..
.........****...***...***...***...***..*...*.......*...*.*..
------------------------------------------------------------
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
------------------------------------------------------------
-
- A great helper
- Posts: 383
- Joined: Mon Oct 18, 2004 8:25 am
- Location: Bangladesh
- Contact:
Re: 403- need some help
@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...
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.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 403- need some help
Input:AC output:
Code: Select all
.C C5 1 |ABCDEFGHIJ|
.C C5 10 |ABCDEFGHIJK|
.C C5 20 |ABCDEFGHIJKL|
.R C5 30 |ABCDEFGHIJK|
.L C5 40 |ABCDEFGHIJKL|
.EOP
Code: Select all
.***..****...****.****..*****.*****..****.*...*.*****...***.
*...*.*...*.*...*.*...*.*.....*.....*.....*...*...*......*..
*****.****..*.....*...*.***...***...*..**.*****...*......*..
*...*.*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..
*...*.****...****.****..*****.*......***..*...*.*****..**...
............................................................
............................................................
............................................................
............................................................
*..****...****.****..*****.*****..****.*...*.*****...***.*..
.*.*...*.*...*.*...*.*.....*.....*.....*...*...*......*..*..
**.****..*.....*...*.***...***...*..**.*****...*......*..***
.*.*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..*..
.*.****...****.****..*****.*......***..*...*.*****..**...*..
............................................................
............................................................
............................................................
............................................................
............................................................
****...****.****..*****.*****..****.*...*.*****...***.*...*.
*...*.*...*.*...*.*.....*.....*.....*...*...*......*..*..*..
****..*.....*...*.***...***...*..**.*****...*......*..***...
*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..*..*..
****...****.****..*****.*......***..*...*.*****..**...*...*.
............................................................
............................................................
............................................................
............................................................
............................................................
****...****.****..*****.*****..****.*...*.*****...***.*...*.
*...*.*...*.*...*.*.....*.....*.....*...*...*......*..*..*..
****..*.....*...*.***...***...*..**.*****...*......*..***...
*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..*..*..
****...****.****..*****.*......***..*...*.*****..**...*...*.
............................................................
............................................................
............................................................
............................................................
............................................................
.***..****...****.****..*****.*****..****.*...*.*****...***.
*...*.*...*.*...*.*...*.*.....*.....*.....*...*...*......*..
*****.****..*.....*...*.***...***...*..**.*****...*......*..
*...*.*...*.*.....*...*.*.....*.....*...*.*...*...*...*..*..
*...*.****...****.****..*****.*......***..*...*.*****..**...
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
------------------------------------------------------------
Check input and AC output for thousands of problems on uDebug!
Re: 403- need some help
I also get WA, but don't know why.
Someone, whose answer is accepted could specify the ouput for this?
My code generates the following output (with WA!):
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
Code: Select all
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
......................***...****.*...*......................
.....................*...*.*...*.**.**......................
...*****.*****..****.*****.*.....*****.*****.*...*.*****....
...*.*.*.*.....*.....*.*.*.*.....*.*.*.*......*.*..*.*.*....
.....*...***....***..*.*.*..****.*.*.*.***.....*.....*......
.....*...*.........*...*...........*...*......*.*....*......
....***..*****.****...***.........***..*****.*...*..***.....
............................................................
.***..*****.*...*.*****.****........*****.*...*.*****.*...*.
*...*.*.*.*.*...*.*.....*...*.......*.*.*.*...*...*...**..*.
*OME*MES*AGE*****.***...****..........*...*****...*...*.*.*.
*...*...*...*...*.*.....*..*..........*...*...*...*...*..**.
.***...***..*...*.*****.*...*........***..*...*.*****.*...*.
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
...***..*...*.*****.****..*...*.****..*****.*****.*****.****
..*...*.*...*.*.....*...*.*...*.*...*...*...*.*.*.*.*.*.*...
..*...*.*.*.*.***...****..*.*.*.****....*.....*.....*...***.
..*.NEED*ANSWER.....*..*..**.**.*..*....*.....*.....*...*...
...***..*...*.*****.*...*.*...*.*...*.*****..***...***..****
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
------------------------------------------------------------
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 403- need some help
AC output for your input
Code: Select all
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
......................***...****.*...*......................
.....................*...*.*...*.**.**......................
...*****.*****..****.*****.*.....*****.*****.*...*.*****....
...*.*.*.*.....*.....*.*.*.*.....*.*.*.*......*.*..*.*.*....
.....*...***....***....*....****...*...***.....*.....*......
.....*...*.........*...*...........*...*......*.*....*......
....***..*****.****...***.........***..*****.*...*..***.....
............................................................
.***..*****.*...*.*****.****........*****.*...*.*****.*...*.
*...*.*.*.*.*...*.*.....*...*.......*.*.*.*...*...*...**..*.
*...*...*...*****.***...****..........*...*****...*...*.*.*.
*...*...*...*...*.*.....*..*..........*...*...*...*...*..**.
.***...***..*...*.*****.*...*........***..*...*.*****.*...*.
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
...***..*...*.*****.****..*...*.****..*****.*****.*****.****
..*...*.*...*.*.....*...*.*...*.*...*...*...*.*.*.*.*.*.*...
..*...*.*.*.*.***...****..*.*.*.****....*.....*.....*...***.
..*.NEED*ANSWER.....*..*..**.**.*..*....*.....*.....*...*...
...***..*...*.*****.*...*.*...*.*...*.*****..***...***..****
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
------------------------------------------------------------
Check input and AC output for thousands of problems on uDebug!
Re: 403- need some help
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...