#1117: 關於第二筆測資有點不懂....


deepdish (Bryan Lee)

School : No School
ID : 4944
IP address : [220.135.88.95]
Last Login :
2014-03-16 00:15:28
b117. TOI2008 4. 地道問題 -- 2008TOI研習營初選 | From: [61.219.36.9] | Post Date : 2008-12-31 09:00

範例輸入

1 2 10

2 1 60

1 3 20

3 4 10

2 4 5

4 1 50

範例輸出

210

假設我走 1->3花20,3->4花10共30,4->1花50共80,1->2花10共90,2->1花60共150

好像不用210耶?是不是我誤會題目意思了?

 
#1120: Re:關於第二筆測資有點不懂....


twbb (GG)

School : 高雄市立高雄高級中學
ID : 1060
IP address : [61.223.245.172]
Last Login :
2009-10-13 22:21:04
b117. TOI2008 4. 地道問題 -- 2008TOI研習營初選 | From: [61.223.247.174] | Post Date : 2008-12-31 19:45

1>2>4>1 for 2

1>2>4>1 for 4

1>3>4>1 for 3

 
#1133: Re:關於第二筆測資有點不懂....


deepdish (Bryan Lee)

School : No School
ID : 4944
IP address : [220.135.88.95]
Last Login :
2014-03-16 00:15:28
b117. TOI2008 4. 地道問題 -- 2008TOI研習營初選 | From: [220.132.173.237] | Post Date : 2009-01-02 13:38

1>2>4>1 for 2

1>2>4>1 for 4

1>3>4>1 for 3

感謝大大回應^^"原來每間房間都要重新繞一遍....囧
 
ZeroJudge Forum