ĐA GIÁC

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

Point: 5

Ví dụ:

Input
5
1 2 3 4 6
Output
7

Ví dụ 2:

Input
4
5 5 5 5
Output
5

Ví dụ 3:

Input
5
10 1 2 3 50
Output
0

Nguồn


HAI TRONG MỘT

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

Point: 5

Ví dụ:

Input
6
3 4 0 3 3 4
4 0 2 3 2 3
Output
3

Nguồn


CÁC BIỂN QUẢNG CÁO

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

Point: 5

Ví dụ:

Input
5
1 2
1 3
2 2
2 5
1 4
Output
4

Nguồn


TRUNG TÂM

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

Point: 5

Đề bài

Ví dụ:

Input
4
1 3 2 5
Output
10

Nguồn