Start 2023-01-28 00:00:00

CSP-S 2022 补测 重现

End 2023-02-04 00:00:00
Contest is over.
Now 2026-11-19 00:42:20

B. 线段中心

Description

Input

Output

Examples

Input

5 100
1 3 2
2 10 2
3 10 3
1 100 1
7 15 4

Output

2
4
2
1
4

Submit

Login

Signup
Time Limit 4 seconds
Memory Limit 1024 MB
Submit