12751 - An Interesting Game

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

Moderator: Board moderators

Post Reply
moudud99
New poster
Posts: 28
Joined: Fri Feb 08, 2013 1:40 pm

Re: 12751 - An Interesting Game

Post by moudud99 »

Is 2nd sample output correct?I think it is wrong.
there n=6,x=3 and k=1.
so the ans will sum of 1,2,4,5,6 which is 18.
in sample output it is 15.
please tell me if I am wrong.
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 12751 - An Interesting Game

Post by brianfry713 »

n=6,k=3 and x=1.
so the ans will sum of 4,5,6 which is 15.
Check input and AC output for thousands of problems on uDebug!
moudud99
New poster
Posts: 28
Joined: Fri Feb 08, 2013 1:40 pm

Re: 12751 - An Interesting Game

Post by moudud99 »

so what actually that line means?
At first move, Jodu will select K consecutive marbles (X, X + 1, X + 2, . . . , X + K ? 1)
starting from X and will remove them
and what about the 1st output?
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 12751 - An Interesting Game

Post by brianfry713 »

The problem statement and sample I/O are correct. I can't explain that line any better than it already is written.

n=5,k=2 and x=2.
so the ans will sum of 1,4,5 which is 10.
Check input and AC output for thousands of problems on uDebug!
moudud99
New poster
Posts: 28
Joined: Fri Feb 08, 2013 1:40 pm

Re: 12751 - An Interesting Game

Post by moudud99 »

so the statement said k numbers starting from x.
sorry I understood wrong...
anyway I got AC as you told.. :wink: :wink: :wink:
Post Reply

Return to “Volume 127 (12700-12799)”