P3096 [USACO13DEC] Vacation Planning G

题目描述

Air Bovinia operates flights connecting the N farms that the cows live on (1

输入格式

\* Line 1: The integers N, M, K, and Q. \* Lines 2..M + 1: Line i+1 contains u\_i, v\_i, and d\_i. (1

输出格式

\* Line 1: The number of ticket requests that can be fullfilled. \* Line 2: The minimum total cost of fulling the possible ticket requests

说明/提示

For the first flight, the only feasible route is 1->2->3, costing 20. There are no flights leaving farm 3, so the poor cows are stranded there.