TRUY VẤN ĐOẠN

Nộp bài
Time limit: 1.0 / Memory limit: 256M

Point: 7

INPUT
8 5
12 10 3 18 6 72 28 42
1 8 6
3 7 7
2 6 9
1 5 5
4 8 4
OUTPUT
6 1 3 1 2

TRIỂN LÃM TRANH

Nộp bài
Time limit: 1.0 / Memory limit: 256M

Point: 7

INPUT
3 4
10 20
5 1
3 5
4 
6 
10
4
OUTPUT
2

THÁM HIỂM

Nộp bài
Time limit: 1.0 / Memory limit: 256M

Point: 6

INPUT
3 2 1
200 300
300 100
100 250
150
110
OUTPUT
250
260