11284 - Shopping Trip
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 11284 - Shopping Trip
Try running your code on the sample input.
Check input and AC output for thousands of problems on uDebug!
Re: 11284 - Shopping Trip
If you are like me - there is a cases with multiple roads between the same shops:
Code: Select all
1
1 2
0 1 1
1 0 2
1
1 3
Re: 11284 - Shopping Trip
I was having problems with precision around 0.
here is some IO.
input:
AC Output:
here is some IO.
input:
Code: Select all
11
1 1
0 1 1.00
1
1 3.00
1 1
0 1 1.00
1
1 2.00
3 3
0 1 1.00
0 2 1.00
0 3 1.00
3
1 2.20
2 1.80
3 2.30
1 2
0 1 1
1 0 2
1
1 3
2 3
0 1 1.00
0 2 1.00
2 3 10.00
2
1 2.01
2 2.01
3 3
0 1 1.00
0 2 1.00
0 3 1.00
3
1 2.01
2 2.01
3 2.01
2 6
0 1 1.00
0 1 2.00
1 2 4.00
2 1 1.00
0 2 1.00
2 2 3.00
2
1 2.00
2 3.00
5 5
0 1 1.00
1 2 1.00
2 3 1.00
3 4 1.00
4 5 1.00
3
1 2.00
3 4.00
5 8.00
1 1
0 1 0.13
1
1 0.26
5 5
0 1 1.00
1 2 1.00
2 3 1.00
3 4 1.00
4 5 1.00
3
1 0.10
3 0.20
5 20.00
6 6
0 1 0.03
1 2 0.03
2 3 0.03
3 4 0.03
4 5 0.03
5 6 0.03
3
1 0.00
3 0.00
6 0.36
Code: Select all
Daniel can save $1.00
Don't leave the house
Daniel can save $0.50
Daniel can save $1.00
Daniel can save $0.02
Daniel can save $0.03
Daniel can save $2.00
Daniel can save $4.00
Don't leave the house
Daniel can save $10.30
Don't leave the house