12650 - Dangerous Dive

All about problems in Volume 126. 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
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

12650 - Dangerous Dive

Post by uDebug »

I nearly missed the following line while reading the problem description:
Leave a blank space after each identifier (notice that, therefore, there must be a blank space after the last identifier in the line).
So, for the following input:

Code: Select all

5 3
3 1 5
6 6
6 1 3 2 5 4
10 4
9 8 1 2
The AC output is as follows where "." indicates a space (" ") character - and "|" represents a newline ("\n" - in C / C++).

Code: Select all

2.4.| 
*|
3.4.5.6.7.10.|
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.
moudud99
New poster
Posts: 28
Joined: Fri Feb 08, 2013 1:40 pm

Re: 12650 - Dangerous Dive

Post by moudud99 »

I think my code is right but actually it's wrong.
Can anyone help me?
Thanks in advance.

Code: Select all

Bugs eating me!
Last edited by moudud99 on Thu Oct 02, 2014 6:47 pm, edited 1 time in total.
lighted
Guru
Posts: 587
Joined: Wed Jun 11, 2014 9:56 pm
Location: Kyrgyzstan, Bishkek

Re: 12650 - Dangerous Dive

Post by lighted »

Change line to

Code: Select all

if(dead.size()>0)
Don't forget to remove your codes after getting accepted. 8)
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
moudud99
New poster
Posts: 28
Joined: Fri Feb 08, 2013 1:40 pm

Re: 12650 - Dangerous Dive

Post by moudud99 »

Thanks a lot you lighted!
Post Reply

Return to “Volume 126 (12600-12699)”