{"trustable":false,"sections":[{"title":"","value":{"format":"PLAIN","content":"N个城市,编号1到N。城市间有R条单向道路。\n每条道路连接两个城市,有长度和过路费两个属性。\nBob只有K块钱,他想从城市1走到城市N。问最短共需要走多长的路。如果到不了N\n输出-1\n"}},{"title":"Input","value":{"format":"PLAIN","content":"输入:\nK\nN\nR\ns1 e1 L1 T1\ns1 e2 L2 T2\n...\nsR eR LR TR \ns e是路起点和终点\n\n2\u003c\u003dN\u003c\u003d100\n0\u003c\u003dK\u003c\u003d10000\n1\u003c\u003dR\u003c\u003d10000\n每条路的长度 L, 1 \u003c\u003d L \u003c\u003d 100\n每条路的过路费T , 0 \u003c\u003d T \u003c\u003d 100\n"}},{"title":"Sample Input","value":{"format":"PLAIN","content":"5\n6\n7\n1 2 2 3\n2 4 3 3\n3 4 2 4\n1 3 4 1\n4 6 2 1\n3 5 2 0\n5 4 3 2\n"}},{"title":"Sample Output","value":{"format":"PLAIN","content":"11"}}]}