255 - Correct Move

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

Moderator: Board moderators

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

Re: 255 - Correct Move

Post by Shahidul.CSE » Mon Sep 15, 2014 9:29 pm

why getting WA? I checked all the test cases on this topic, I am getting correct output, but even judge is giving me WA, please anybody check my code to find out what is wrong.
[codeAccepted ![/code]
Last edited by Shahidul.CSE on Tue Sep 16, 2014 9:02 pm, edited 1 time 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

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

Re: 255 - Correct Move

Post by brianfry713 » Tue Sep 16, 2014 8:11 pm

Input:

Code: Select all

13 1 50
38 37 49
AC output:

Code: Select all

Illegal move
Illegal move
Check input and AC output for thousands of problems on uDebug!

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

Re: 255 - Correct Move

Post by Shahidul.CSE » Tue Sep 16, 2014 8:57 pm

Thank you sir,
Now got accepted!
I made a little mistake for legal moves loop, I used i<=l instead of i<l .
What a stupid mistake !! :)
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

Post Reply

Return to “Volume 2 (200-299)”