P1938 [USACO09NOV] Job Hunt S

题目描述

Bessie is running out of money and is searching for jobs. Farmer John knows this and wants the cows to travel around so he has imposed a rule that his cows can only make D (1

输入格式

输出格式

说明/提示

This world has five cities, three paths and two jet routes. Bessie starts out in city 1, and she can only make 100 dollars in each city before moving on. Bessie can travel from city 1 to city 5 to city 2 to city 3, and make a total of 4\*100 - 150 = 250 dollars. Source: USACO 2009 November Silver 这个世界上有五个城市,三条单向路径和两条单向航线。贝茜从一号城市开始她的旅行,她在离开一个城市前最多只能在这个城市赚100美元。 贝茜可以通过从一号城市-->五号城市-->二号城市-->三号城市的旅行赚到4\*100-150=250美元。 (注:在四个城市各赚100美元,从五号城市飞到二号城市花掉150美元) 来源:USACO 2009 十一月银组