11917 - Do Your Own Homework
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 11917 - Do Your Own Homework
It looks like you figured it out.
Check input and AC output for thousands of problems on uDebug!
-
- New poster
- Posts: 10
- Joined: Mon Jun 24, 2013 7:39 am
Re: 11917 - Do Your Own Homework
Hi all!
This code I did returns WA, even when I tested with available cases with success
Where's my fault? I can't find it 
I appreciate your replies
P.S. I don't know why I'm feeling that this code fails in limit cases...


Code: Select all
Got AC :P If I could do it, you can too :P

I appreciate your replies

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.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 11917 - Do Your Own Homework
Print a newline char at the end of the last line.
Check input and AC output for thousands of problems on uDebug!
-
- New poster
- Posts: 10
- Joined: Mon Jun 24, 2013 7:39 am
Re: 11917 - Do Your Own Homework
Ok, I did what you told me, and bingo, it worked WOOHOO!!! 
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!

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!

-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 11917 - Do Your Own Homework
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!
Re: 11917 - Do Your Own Homework
here is my code


Last edited by TLEorWA on Tue Apr 01, 2014 11:53 am, edited 1 time in total.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 11917 - Do Your Own Homework
Change line 28 to:
if( day[j] <= D )
if( day[j] <= D )
Check input and AC output for thousands of problems on uDebug!