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

Post Reply
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

Post by anton_indrawan » Fri Mar 01, 2013 12:10 am

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

Post by brianfry713 » Fri Mar 01, 2013 2:56 am

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

Post by anton_indrawan » Sat Mar 02, 2013 12:59 am

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

Post by starain » Tue Sep 10, 2013 9:38 am

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

Post by brianfry713 » Tue Sep 10, 2013 11:13 pm

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

Post by brianfry713 » Thu Nov 14, 2013 12:17 am

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

Post by Tanmoy1228 » Sat Jan 31, 2015 8:25 pm

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

Post by brianfry713 » Tue Feb 03, 2015 12:54 am

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

Post by Tanmoy1228 » Wed Feb 11, 2015 5:47 pm

brianfry713 wrote:Try the I/O in this thread.
Thank you brianfry

User avatar
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

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

Post by uDebug » Fri Mar 27, 2015 1:48 pm

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.

Post Reply

Return to “Volume 123 (12300-12399)”