Home Web Board ProblemSet Standing Status Statistics
long long输出请使用 %lld服务器的python版本为3.4
Problem B: 外星人

Problem B: 外星人

Time Limit: 2 Sec  Memory Limit: 256 MB
Submit: 12  Solved: 4
[Submit][Status][Web Board]

Description

Input

Output

Sample Input

3 2 4 2
5 10 5
1 1
1 2
2 2
2 3
6 10
2 10

Sample Output

4
8

HINT


[Submit][Status][Web Board]