11917 - Do Your Own Homework

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

Moderator: Board moderators

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

Re: 11917 - Do Your Own Homework

Post by brianfry713 »

It looks like you figured it out.
Check input and AC output for thousands of problems on uDebug!

sm_programmer
New poster
Posts: 10
Joined: Mon Jun 24, 2013 7:39 am

Re: 11917 - Do Your Own Homework

Post by sm_programmer »

Hi all! :D This code I did returns WA, even when I tested with available cases with success :(

Code: Select all

Got AC :P If I could do it, you can too :P
Where's my fault? I can't find it :-?
I appreciate your replies :D

P.S. I don't know why I'm feeling that this code fails in limit cases... :-?
Last edited by sm_programmer on Wed Dec 18, 2013 10:16 pm, edited 2 times in total.

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

Re: 11917 - Do Your Own Homework

Post by brianfry713 »

Print a newline char at the end of the last line.
Check input and AC output for thousands of problems on uDebug!

sm_programmer
New poster
Posts: 10
Joined: Mon Jun 24, 2013 7:39 am

Re: 11917 - Do Your Own Homework

Post by sm_programmer »

Ok, I did what you told me, and bingo, it worked WOOHOO!!! :D

But I have a question... as far as I know, that should be a PE, shouldn't it? Then, why most problems you had helped me to get AC, had such PE errors which the OJ interprets as WA? That concerns me :(

Thanks anyway! :D

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

Re: 11917 - Do Your Own Homework

Post by brianfry713 »

Missing or extra newline chars will usually give WA. Don't count on getting PE.
Check input and AC output for thousands of problems on uDebug!

TLEorWA
New poster
Posts: 12
Joined: Sat Mar 01, 2014 12:56 pm

Re: 11917 - Do Your Own Homework

Post by TLEorWA »

here is my code

:wink:
Last edited by TLEorWA on Tue Apr 01, 2014 11:53 am, edited 1 time in total.

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

Re: 11917 - Do Your Own Homework

Post by brianfry713 »

Change line 28 to:
if( day[j] <= D )
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 119 (11900-11999)”