10337 - Flight Planner

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

Moderator: Board moderators

amin__
New poster
Posts: 10
Joined: Thu Jul 01, 2010 10:44 am

Re: 10337 - Flight Planner

Post by amin__ » Sun Aug 14, 2011 7:21 pm

hello brother LucasSchm,

your thinking
"you are not allowed to go down to altitude 0, except at starting and landing"

I am confused with this..because my code allows to go down to altitude 0 at any level of path...and it AC.
so I think it is not a major bug...as my code the following case output 80...but according to your thinking it must differ..


1

300
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10


output is : 80


:)

deebee
New poster
Posts: 2
Joined: Fri Apr 20, 2012 5:17 am

Re: 10337 - Flight Planner

Post by deebee » Wed May 30, 2012 2:18 am

My accepted code's output for the following input:

Code: Select all

16

400
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 9 9 1
1 -9 -9 1

1000
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9  
 7  7  7  7  7  7  7  7  7  7
-5 -5 -5 -5 -5 -5 -5 -5 -5 -5
-7 -3 -7 -7 -7 -7 -7 -7 -7 -7
-9 -9 -9 -9 -9 -9 -9 -9 -9 -9

300
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10

1000
9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9  
7 7 7 7 7 7 7 7 7 7
5 5 5 5 5 5 5 5 5 5
7 3 7 7 7 7 7 7 7 7
9 9 9 9 9 9 9 9 9 9

400
1 1 1 -1
1 -1 1 1
1 1 1 1
1 1 -1 1
-1 1 1 1
1 5 6 -1
1 -1 1 4
-7 4 -3 1
2 9 -9 4
1 -9 -9 1

1000
-9 -9 -9 -9 -9 -9 -9 -9 -9 -9
-9 -9 -9 -9 -9 -9 -9 -9 -9 -9
-9 -9 -9 -9 -9 -9 -9 -9 -9 -9
-9 -9 -9 -9 -9 -9 -9 -9 -9 -9
-9 -9 -9 -9 -9 -9 -9 -9 -9 -9
-9 -9 -9 -9 -9 -9 -9 -9 -9 -9 
-7 -7 -7 -7 -7 -7 -7 -7 -7 -7
-5 -5 -5 -5 -5 -5 -5 -5 -5 -5
-7 -3 -7 -7 -7 -7 -7 -7 -7 -7
-9 -9 -9 -9 -9 -9 -9 -9 -9 -9

700
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1

1000
 9  9  9  9  9  9  9  9  9  9
 9  9  9  -9  -9  9  9  9  9  9
 9  9  9  -6  9  -8  -9  9  9  9
 9  9  6  9  10  10  10  10  9  9
 -10  -10  -10  6  7  5  9  9  9  9
 9  9  -4  9  6  9  9  -9  9  9  
 7  7  2  5  -4  -6  7  -7  7  7
-5 -3 -5 5 5 -5 -5 5 -5 -5
7 3 -8 7 -7 4 5 -7 7 -8
-5 -9 9 9 -9 -9 -9 6 6 -9

400
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
0 0 0 0
0 0 0 0

1000
 9  9  6  9  5  -4  -9  9  9  9
 -1  9  9  -9  -9  4  1  -3  -9  9
 9  -2  3  -6  9  -8  -9  9  4  9
 9  9  6  9  10  10  10  10  3  3
 -10  -10  -1  3  0  0  9  9  9  6
 9  5  -4  2  6  9  9  -9  9  9  
 7  8  3  5  -4  -6  0  -7  3  7
-5 -3 5 2 5 -1 -3 5 -5 -2
7 3 -8 1 -7 4 5 -7 4 1
-5 -9 2 1 -9 -9 -9 4 6 -9

400
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0

1200
 9  9  6  9  5  -4  -9  9  9  9 3 2
 -1  9  9  -9  -9  4  1  -3  -9  9 4 4
 9  -2  3  -6  9  -8  -9  9  4  9 7 8
 9  9  6  9  10  10  10  10  3  3 -9 -9
 -10  -10  -1  3  0  0  9  9  9  6 0 0
 9  5  -4  2  6  9  9  -9  9  9 2 3
 7  8  3  5  -4  -6  0  -7  -3  7 6 1
-5 -3 5 2 5 -1 -3 5 -5 -2 5 4
7 3 -8 1 -7 4 5 -7 4 1 -3 2
-5 -9 2 1 -9 -9 -9 4 6 -9 7 8

400
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 6 2
1 -5 1 5
3 7 6 -2
1 3 10 8
-5 -9 10 1
1 9 -9 1

1500
 9  9  6  9  5  -4  -9  9  9  9 3 2 5 1 0
 -1  9  9  -9  -9  4  1  -3  -9  9 4 4 3 0 -9
 9  -2  3  -6  9  -8  -9  9  4  9 7 8 2 -7 6
 9  9  6  9  10  10  10  10  3  3 -9 -9 1 0 1
 -10  -10  -1  3  0  0  9  9  9  6 0 0 -9 9 -2
 9  5  -4  2  6  9  9  -9  9  9 2 3 3 3 1
 7  8  3  5  -4  -6  0  -7  -3  7 6 1 -8 7 6
-5 -3 5 2 5 -1 -3 5 -5 -2 5 4 3 4 5
7 3 -8 1 -7 4 5 -7 4 1 -3 2 10 -10 2
-5 -9 2 1 -9 -9 -9 4 6 -9 7 8 -6 4 5

700
1 1 9 1 -10 -10 -10
1 3 -7 4 7 10 10
1 3 -4 1 -4 1 5
1 10 2 3 0 1 -2
-10 2 6 2 7 3 -1
1 -5 1 3 2 -5 4
3 8 2 -2 -5 7 8
1 3 -9 8 -10 3 5
-5 -9 10 1 2 -8 1
1 9 -9 1 0 4 -5

1700
 9  9  6  9  5  -4  -9  9  9  9 3 2 5 1 0 3 4
 -1  9  9  -9  -9  -4  -1  -3  -9  9 4 4 3 0 -9 -2 1
 9  -2  3  -6  9  -8  -9  9  4  9 7 8 2 -7 6 7 8
 9  9  6  7  1  2  3  -10  3  3 -9 -9 1 0 1 0 0
 -10  10  -1  3  0  4  9  9  -9  6 3 0 -9 9 -2 -3 3
 9  5  -4  -9  6  9  9  -9  -9  9 2 3 3 3 1 5 -1
 7  1  3  5  -4  -6  2  -7  -3  -7 6 1 -8 7 6 8 -3
-5 -3 5 -10 5 -1 -2 -10 -5 -2 5 4 3 4 5 -4 3
7 2 -8 10 -7 4 5 -7 4 1 -3 2 1 -10 2 5 0
-5 -9 2 1 -9 -9 -9 4 6 -9 7 8 -6 4 5 2 3

Accepted output:

Code: Select all

120

354

80

210

135

388

203

311

120

320

120

365

118

452

208

505


just_yousef
New poster
Posts: 50
Joined: Tue Dec 17, 2013 11:01 pm

Re: 10337 - Flight Planner

Post by just_yousef » Sun Jul 27, 2014 7:38 pm

My AC output for these cases:

Code: Select all

16

400
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 9 9 1
1 -9 -9 1

1000
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9
 9  9  9  9  9  9  9  9  9  9  
 7  7  7  7  7  7  7  7  7  7
-5 -5 -5 -5 -5 -5 -5 -5 -5 -5
-7 -3 -7 -7 -7 -7 -7 -7 -7 -7
-9 -9 -9 -9 -9 -9 -9 -9 -9 -9

300
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10
10 -10 10

1000
9 9 9 9 9 9 9 9 9 9
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 1
0 0 0 0
0 0 0 0

1000
 9  9  6  9  5  -4  -9  9  9  9
 -1  9  9  -9  -9  4  1  -3  -9  9
 9  -2  3  -6  9  -8  -9  9  4  9
 9  9  6  9  10  10  10  10  3  3
 -10  -10  -1  3  0  0  9  9  9  6
 9  5  -4  2  6  9  9  -9  9  9  
 7  8  3  5  -4  -6  0  -7  3  7
-5 -3 5 2 5 -1 -3 5 -5 -2
7 3 -8 1 -7 4 5 -7 4 1
-5 -9 2 1 -9 -9 -9 4 6 -9

400
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0

1200
 9  9  6  9  5  -4  -9  9  9  9 3 2
 -1  9  9  -9  -9  4  1  -3  -9  9 4 4
 9  -2  3  -6  9  -8  -9  9  4  9 7 8
 9  9  6  9  10  10  10  10  3  3 -9 -9
 -10  -10  -1  3  0  0  9  9  9  6 0 0
 9  5  -4  2  6  9  9  -9  9  9 2 3
 7  8  3  5  -4  -6  0  -7  -3  7 6 1
-5 -3 5 2 5 -1 -3 5 -5 -2 5 4
7 3 -8 1 -7 4 5 -7 4 1 -3 2
-5 -9 2 1 -9 -9 -9 4 6 -9 7 8

400
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 6 2
1 -5 1 5
3 7 6 -2
1 3 10 8
-5 -9 10 1
1 9 -9 1

1500
 9  9  6  9  5  -4  -9  9  9  9 3 2 5 1 0
 -1  9  9  -9  -9  4  1  -3  -9  9 4 4 3 0 -9
 9  -2  3  -6  9  -8  -9  9  4  9 7 8 2 -7 6
 9  9  6  9  10  10  10  10  3  3 -9 -9 1 0 1
 -10  -10  -1  3  0  0  9  9  9  6 0 0 -9 9 -2
 9  5  -4  2  6  9  9  -9  9  9 2 3 3 3 1
 7  8  3  5  -4  -6  0  -7  -3  7 6 1 -8 7 6
-5 -3 5 2 5 -1 -3 5 -5 -2 5 4 3 4 5
7 3 -8 1 -7 4 5 -7 4 1 -3 2 10 -10 2
-5 -9 2 1 -9 -9 -9 4 6 -9 7 8 -6 4 5

700
1 1 9 1 -10 -10 -10
1 3 -7 4 7 10 10
1 3 -4 1 -4 1 5
1 10 2 3 0 1 -2
-10 2 6 2 7 3 -1
1 -5 1 3 2 -5 4
3 8 2 -2 -5 7 8
1 3 -9 8 -10 3 5
-5 -9 10 1 2 -8 1
1 9 -9 1 0 4 -5

1700
 9  9  6  9  5  -4  -9  9  9  9 3 2 5 1 0 3 4
 -1  9  9  -9  -9  -4  -1  -3  -9  9 4 4 3 0 -9 -2 1
 9  -2  3  -6  9  -8  -9  9  4  9 7 8 2 -7 6 7 8
 9  9  6  7  1  2  3  -10  3  3 -9 -9 1 0 1 0 0
 -10  10  -1  3  0  4  9  9  -9  6 3 0 -9 9 -2 -3 3
 9  5  -4  -9  6  9  9  -9  -9  9 2 3 3 3 1 5 -1
 7  1  3  5  -4  -6  2  -7  -3  -7 6 1 -8 7 6 8 -3
-5 -3 5 -10 5 -1 -2 -10 -5 -2 5 4 3 4 5 -4 3
7 2 -8 10 -7 4 5 -7 4 1 -3 2 1 -10 2 5 0
-5 -9 2 1 -9 -9 -9 4 6 -9 7 8 -6 4 5 2 3

Code: Select all

120

354

100

232

135

388

223

322

140

323

140

384

119

468

214

525
weird isn't it !! :o :o

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

Re: 10337 - Flight Planner

Post by brianfry713 » Mon Jul 28, 2014 8:36 pm

just_yousef, your output is wrong, deebee's is correct. Are you assuming you can't stay at altitude 0 for the entire flight?
Check input and AC output for thousands of problems on uDebug!

just_yousef
New poster
Posts: 50
Joined: Tue Dec 17, 2013 11:01 pm

Re: 10337 - Flight Planner

Post by just_yousef » Wed Jul 30, 2014 8:42 pm

brianfry713 wrote:just_yousef, your output is wrong, deebee's is correct. Are you assuming you can't stay at altitude 0 for the entire flight?
Yes I do

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

Re: 10337 - Flight Planner

Post by brianfry713 » Thu Jul 31, 2014 10:24 pm

The problem statement doesn't forbid flying at altitude 0 enroute.
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 103 (10300-10399)”