Vé giảm giá một nửa

General
Points
40
AC Rate
0.0%
Time limit
1.0 s
Memory limit
256M
Group
dp
Submissions
.
Ví dụ
Input Output
3 4
1 2 3
2 3 1
1 3 7
2 1 5
2
3 1
1 2 10
-1
Giới hạn
  • $1 \le N \le 10^5$, $0 \le M \le 2 \cdot 10^5$
  • $0 \le w \le 10^9$
Draft saved