## 12376 - As Long as I Learn, I Live

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

Moderator: Board moderators

anton_indrawan
New poster
Posts: 6
Joined: Mon Dec 15, 2008 3:34 pm
Location: Surabaya, Indonesia

### 12376 - As Long as I Learn, I Live

I got a WA for 12376.

According to the issue description, we start from 0th node and will always go to a stage that has the highest value.
I might overlook something from it.
Could anyone give a good direction or test cases for this problem?

Input:

Code: Select all

``````5
6 6
0 8 9 2 7 5
5 4
5 3
1 5
0 1
0 2
2 1

6 5
0 8 9 2 7 5
5 4
5 3
1 5
0 1
0 2

6 5
0 20 30 40 50 60
0 1
0 2
0 3
0 4
0 5

6 3
0 20 30 40 50 60
0 1
1 5
5 4

2 1
0 1000
0 1
``````
My output:

Code: Select all

``````Case 1: 29 4
Case 2: 9 2
Case 3: 60 5
Case 4: 130 4
Case 5: 1000 1
``````
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 12376 - As Long As I Learn, I Live

Your I/O and description are correct.
Check input and AC output for thousands of problems on uDebug!
anton_indrawan
New poster
Posts: 6
Joined: Mon Dec 15, 2008 3:34 pm
Location: Surabaya, Indonesia

### Re: 12376 - As Long As I Learn, I Live

I got it AC. I was mistaken when sorting values
starain
New poster
Posts: 4
Joined: Thu Nov 15, 2012 10:49 pm

### Re: 12376 - As Long As I Learn, I Live

Is the sample I/O anton_indrawan gave correct? And brain fry what do you mean by "Your I/O and description are correct."
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 12376 - As Long As I Learn, I Live

Yes the I/O anton_indrawan gave is correct and what he wrote about the problem statement is also correct.
Check input and AC output for thousands of problems on uDebug!
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 12376 - As Long As I Learn, I Live

Input:

Code: Select all

``````1

3 2
0 2 1
0 1
0 2
``````
AC output:

Code: Select all

``Case 1: 2 1``
Check input and AC output for thousands of problems on uDebug!
Tanmoy1228
New poster
Posts: 10
Joined: Sat Jul 19, 2014 2:55 am

### Re: 12376 - As Long as I Learn, I Live

got WA
can not find out the problem
please help

Code: Select all

``Remove after AC ``
Last edited by Tanmoy1228 on Wed Feb 11, 2015 5:48 pm, edited 1 time in total.
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 12376 - As Long as I Learn, I Live

Try the I/O in this thread.
Check input and AC output for thousands of problems on uDebug!
Tanmoy1228
New poster
Posts: 10
Joined: Sat Jul 19, 2014 2:55 am

### Re: 12376 - As Long as I Learn, I Live

brianfry713 wrote:Try the I/O in this thread.
Thank you brianfry
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

### Re: 12376 - As Long as I Learn, I Live

Replying to follow the thread.
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.