10992 - The Ghost of Programmers

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

Moderator: Board moderators

User avatar
arsalan_mousavian
Experienced poster
Posts: 111
Joined: Mon Jan 09, 2006 6:19 pm
Location: Tehran, Iran
Contact:

10992 - The Ghost of Programmers

Post by arsalan_mousavian » Sat Feb 11, 2006 7:36 pm

hi
can anybody give me some tricky i/o ? cause i got WA on this problem :(
thanks in advance

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf » Sat Feb 11, 2006 7:41 pm

Y may be less than 2148. Obviously, the output for such cases should be "no ghost."

helloneo
Guru
Posts: 516
Joined: Mon Jul 04, 2005 6:30 am
Location: Seoul, Korea

Post by helloneo » Sat Feb 11, 2006 7:50 pm

mf wrote:Y may be less than 2148. Obviously, the output for such cases should be "no ghost."
sure i did handle that case.. maybe something else..

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf » Sat Feb 11, 2006 8:02 pm

Here's some I/O. Check your spelling of the names.

Code: Select all

332525673007965087892773
1
2147
2148
2149
2150
95612385845354974856360464459504945652183158751232
53387
0

Code: Select all

332525673007965087892773
Ghost of Shahriar Manzoor!!!
Ghost of Derek Kisman!!!

1
No ghost will come in this year

2147
No ghost will come in this year

2148
Ghost of Tanveer Ahsan!!!
Ghost of Shahriar Manzoor!!!
Ghost of Adrian Kugel!!!
Ghost of Anton Maydell!!!
Ghost of Derek Kisman!!!
Ghost of Rezaul Alam Chowdhury!!!
Ghost of Jimmy Mardell!!!
Ghost of Monirul Hasan!!!
Ghost of K. M. Iftekhar!!!

2149
No ghost will come in this year

2150
Ghost of Tanveer Ahsan!!!

95612385845354974856360464459504945652183158751232
Ghost of Tanveer Ahsan!!!
Ghost of Adrian Kugel!!!
Ghost of Jimmy Mardell!!!
Ghost of K. M. Iftekhar!!!

53387
No ghost will come in this year

Darko
Guru
Posts: 580
Joined: Fri Nov 11, 2005 9:34 am
Location: Calgary, Canada

Post by Darko » Sun Feb 12, 2006 12:56 am

Code: Select all

Y may be less than 2148. Obviously, the output for such cases should be "no ghost."
Sigh, I shouldn't be doing these 5am things... I handled that case nicely, so the difference wasn't negative, heh.

Darko

erdos
New poster
Posts: 32
Joined: Sat Jul 06, 2002 9:38 pm
Location: Lisbon
Contact:

Post by erdos » Sun Feb 12, 2006 4:21 am

Shouldn't we subtract from the given year 2148?

I guess so.
Otherwise for the given input (2500 for instance) the answer would be other.

Could you please give more input?

User avatar
lord_burgos
New poster
Posts: 43
Joined: Mon Oct 13, 2003 4:54 pm
Location: Mexico
Contact:

Post by lord_burgos » Sun Feb 12, 2006 5:15 am

erdos wrote:Shouldn't we subtract from the given year 2148?

I guess so.
Otherwise for the given input (2500 for instance) the answer would be other.

Could you please give more input?
intput

Code: Select all

2148
2147
4654615786132154654136465432146451321
1321346523123131320321321321231213132
2146
2145
1444
0
output

Code: Select all

2148
Ghost of Tanveer Ahsan!!!
Ghost of Shahriar Manzoor!!!
Ghost of Adrian Kugel!!!
Ghost of Anton Maydell!!!
Ghost of Derek Kisman!!!
Ghost of Rezaul Alam Chowdhury!!!
Ghost of Jimmy Mardell!!!
Ghost of Monirul Hasan!!!
Ghost of K. M. Iftekhar!!!

2147
No ghost will come in this year

4654615786132154654136465432146451321
No ghost will come in this year

1321346523123131320321321321231213132
Ghost of Tanveer Ahsan!!!
Ghost of K. M. Iftekhar!!!

2146
No ghost will come in this year

2145
No ghost will come in this year

1444
No ghost will come in this year

good lock

User avatar
Abednego
A great helper
Posts: 281
Joined: Tue Sep 10, 2002 5:14 am
Location: Mountain View, CA, USA
Contact:

Post by Abednego » Sun Feb 12, 2006 5:46 am

Does anyone know what the cause of the Presentation Errors is? There are twice as many PE's as AC's. I tried printing a blank line after each case and between cases - PE.
If only I had as much free time as I did in college...

tywok
New poster
Posts: 32
Joined: Sun Oct 30, 2005 2:22 am

Post by tywok » Sun Feb 12, 2006 6:15 am

i think during contest you had to write the last blank line if you wanted it to be AC. That's why most submitters got PE, because the submitted the code written during contest
Impossible is nothing

User avatar
Abednego
A great helper
Posts: 281
Joined: Tue Sep 10, 2002 5:14 am
Location: Mountain View, CA, USA
Contact:

Post by Abednego » Sun Feb 12, 2006 6:53 am

I tried both - with the extra blank line and wihout. I also tried submitting with no blank lines. PE every time.
If only I had as much free time as I did in college...

User avatar
arsalan_mousavian
Experienced poster
Posts: 111
Joined: Mon Jan 09, 2006 6:19 pm
Location: Tehran, Iran
Contact:

Post by arsalan_mousavian » Sun Feb 12, 2006 7:03 am

thanks mf , i got AC :lol:

TISARKER
Learning poster
Posts: 88
Joined: Tue Oct 12, 2004 6:45 pm
Location: Bangladesh
Contact:

Post by TISARKER » Sun Feb 12, 2006 8:33 am

Sorry For my posting code.
I have tried all possible case under my ability.
But can not understand for which i am getting WA.
Please help me :oops:

Code: Select all

Delete Code
Last edited by TISARKER on Sun Feb 12, 2006 12:29 pm, edited 1 time in total.
Mr. Arithmetic logic Unit

Eduard
Experienced poster
Posts: 183
Joined: Fri Sep 26, 2003 2:54 pm
Location: Armenia,Yerevan

Post by Eduard » Sun Feb 12, 2006 10:15 am

TISARKER you check leap year not for given year,but for year-2148,it is your only mistake!
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650

TISARKER
Learning poster
Posts: 88
Joined: Tue Oct 12, 2004 6:45 pm
Location: Bangladesh
Contact:

Post by TISARKER » Sun Feb 12, 2006 12:33 pm

Eduard wrote:TISARKER you check leap year not for given year,but for year-2148,it is your only mistake!
Thanks Eduard :D
Many Many thanks .It just a silly but great mistake. :P
Mr. Arithmetic logic Unit

lonelyone
Learning poster
Posts: 65
Joined: Sat Feb 19, 2005 6:53 pm

Post by lonelyone » Tue Feb 14, 2006 4:09 pm

any more test data please
I got wrong answer all the time

Post Reply

Return to “Volume 109 (10900-10999)”