I can't describe the problem

Time Limit: 6000/3000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)

Problem Description

Input

 

Output

 

Sample Input

2 1 100 2
1 2 12

Sample Output

3 96

Hint

Source

Maddoctor

Manager

Information
Solved Number1
Submit Number2
Problem Tags
shortest paths
No tag edit access
温馨提示:AC后可以编辑标签哦. ^-^
Login
LoginCancel