11946 - Code Number

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

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

Re: 11946 - Code Number

Post by TLEorWA » Sun Mar 30, 2014 11:08 pm

AC :D
Last edited by TLEorWA on Tue Apr 01, 2014 11:52 am, edited 1 time in total.

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

Re: 11946 - Code Number

Post by brianfry713 » Tue Apr 01, 2014 2:24 am

You must print a blank line between each test case. Don't print an extra blank line at the end.
Check input and AC output for thousands of problems on uDebug!

User avatar
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

Re: 11946 - Code Number

Post by uDebug » Tue Apr 01, 2014 9:01 am

TLEorWA wrote:WA,help?
Also, if you're going to be sharing code using Pastebin (or other similar sites) then note that code can be syntax highlighted. Makes things easier to read for people reviewing your code.
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.

Shahidul.CSE
Experienced poster
Posts: 148
Joined: Sun Jul 13, 2014 4:32 am
Location: Rangpur, Bangladesh

Re: 11946 - Code Number

Post by Shahidul.CSE » Tue Jul 22, 2014 5:12 pm

Whats wrong with my code?

Code: Select all

Code removed after getting Accepted !
:D
Last edited by Shahidul.CSE on Tue Jul 22, 2014 6:52 pm, edited 3 times in total.
Md. Shahidul Islam
Dept. of CSE at Begum Rokeya University, Rangpur, Bangladesh
UVa id: http://uhunt.felix-halim.net/id/438420
My facebook account,
Email me: shahidul.cse.brur@gmail.com

lighted
Guru
Posts: 585
Joined: Wed Jun 11, 2014 9:56 pm
Location: Kyrgyzstan, Bishkek

Re: 11946 - Code Number

Post by lighted » Tue Jul 22, 2014 5:56 pm

Don't read from file
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman

Shahidul.CSE
Experienced poster
Posts: 148
Joined: Sun Jul 13, 2014 4:32 am
Location: Rangpur, Bangladesh

Re: 11946 - Code Number

Post by Shahidul.CSE » Tue Jul 22, 2014 6:00 pm

I did that only for checking by myself.

Why WA?
Md. Shahidul Islam
Dept. of CSE at Begum Rokeya University, Rangpur, Bangladesh
UVa id: http://uhunt.felix-halim.net/id/438420
My facebook account,
Email me: shahidul.cse.brur@gmail.com

lighted
Guru
Posts: 585
Joined: Wed Jun 11, 2014 9:56 pm
Location: Kyrgyzstan, Bishkek

Re: 11946 - Code Number

Post by lighted » Tue Jul 22, 2014 6:03 pm

Remove this line and you will get accepted.

Code: Select all

freopen("11946.txt", "r", stdin);
Copy/paste from post above. :D
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman

Shahidul.CSE
Experienced poster
Posts: 148
Joined: Sun Jul 13, 2014 4:32 am
Location: Rangpur, Bangladesh

Re: 11946 - Code Number

Post by Shahidul.CSE » Tue Jul 22, 2014 6:18 pm

Thank you, got accepted ! :D

it was my mistake. When I submitted, I didn't remove that line.
Md. Shahidul Islam
Dept. of CSE at Begum Rokeya University, Rangpur, Bangladesh
UVa id: http://uhunt.felix-halim.net/id/438420
My facebook account,
Email me: shahidul.cse.brur@gmail.com

bgcsaif
New poster
Posts: 38
Joined: Mon Sep 29, 2014 4:03 pm

Re: 11946 - Code Number

Post by bgcsaif » Mon Sep 29, 2014 4:12 pm

Code: Select all

Removed after getting accepted! Unlimited thanks to brianfry713.
Last edited by bgcsaif on Fri Oct 03, 2014 11:28 am, edited 1 time in total.

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

Re: 11946 - Code Number

Post by brianfry713 » Mon Sep 29, 2014 8:21 pm

Try running your code on the sample input.
Check input and AC output for thousands of problems on uDebug!

bgcsaif
New poster
Posts: 38
Joined: Mon Sep 29, 2014 4:03 pm

Re: 11946 - Code Number

Post by bgcsaif » Tue Sep 30, 2014 9:34 am

I tried all sample inputs. It's ok. And i seperated each test cases with a blank line. But i got WA. Please, have a close look. I might be wrong somewhere. Thank you.

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

Re: 11946 - Code Number

Post by brianfry713 » Tue Sep 30, 2014 2:09 pm

http://ideone.com/qlkB8C

For the sample input, your output is:

Code: Select all

HELLO MY LOVE, I M HAPPY BECAUSE SOON I WILL BE TO YOUR SIDE. THIS 
The correct output is:

Code: Select all

HELLO MY LOVE, I M HAPPY BECAUSE SOON I WILL BE TO YOUR SIDE. THIS 
TIME WITHOUT YOU HAS BEEN ETERNAL. I INVITE YOU TO THE ZOO ONE TO 
SEE THE ZEBRAS AND GORILAS.
Check input and AC output for thousands of problems on uDebug!

bgcsaif
New poster
Posts: 38
Joined: Mon Sep 29, 2014 4:03 pm

Re: 11946 - Code Number

Post by bgcsaif » Tue Sep 30, 2014 3:13 pm

Sir, I don't know what's wrong. But you must believe I am getting complete output on my IDE(GNU-GCC WINGMINGW-CODEBLOCKS). Can you help me with any hints or information please? Thank you . . . .

bgcsaif
New poster
Posts: 38
Joined: Mon Sep 29, 2014 4:03 pm

Re: 11946 - Code Number

Post by bgcsaif » Tue Sep 30, 2014 3:51 pm

Sir, I ran my code on ideone. But it's fine here. :roll:
http://ideone.com/zbz0mH

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

Re: 11946 - Code Number

Post by brianfry713 » Tue Sep 30, 2014 9:37 pm

The first line of input gives the number of test cases, not the number of lines.

For input:

Code: Select all

2
H3LL0 MY L0V3, 1 M H499Y 83C4U53 500N 1 W1LL 83 70 Y0UR 51D3. 7H15 
71M3 W17H0U7 Y0U H45 833N 373RN4L. 1 1NV173 Y0U 70 7H3 200 0N3 70 
533 7H3 238R45 4ND 60R1L45.

H3LL0 MY L0V3, 1 M H499Y 83C4U53 500N 1 W1LL 83 70 Y0UR 51D3. 7H15 
71M3 W17H0U7 Y0U H45 833N 373RN4L. 1 1NV173 Y0U 70 7H3 200 0N3 70 
533 7H3 238R45 4ND 60R1L45.
The output should be:

Code: Select all

HELLO MY LOVE, I M HAPPY BECAUSE SOON I WILL BE TO YOUR SIDE. THIS 
TIME WITHOUT YOU HAS BEEN ETERNAL. I INVITE YOU TO THE ZOO ONE TO 
SEE THE ZEBRAS AND GORILAS.

HELLO MY LOVE, I M HAPPY BECAUSE SOON I WILL BE TO YOUR SIDE. THIS 
TIME WITHOUT YOU HAS BEEN ETERNAL. I INVITE YOU TO THE ZOO ONE TO 
SEE THE ZEBRAS AND GORILAS.
You changed the sample input to be all on one line, which it is not, it is on 3 lines.
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 119 (11900-11999)”