Binary Supersonic Utahraptors

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Alexey and Boris are playing a game called Binary Supersonic Utahraptors (BSU). 

Initially, Alexey has nn utahraptors, and Boris has mm utahraptors. Each utahraptor is either yellow or red.

Then, the players take kk turns described by integers s_1,s_2,,s_ks\_1, s\_2, \ldots, s\_k. The ii-th turn is performed as follows. First, Alexey chooses s_is\_i utahraptors that belong to him and gives them to Boris. Then, Boris chooses s_is\_i utahraptors that belong to him (the utahraptors that Alexey has just given to him may also be chosen) and gives them to Alexey.

When the kk moves are done, the score of the game is calculated. The score is equal to a_yb_r|a\_y - b\_r|, where a_ya\_y is the number of yellow utahraptors Alexey has, and b_rb\_r is the number of red utahraptors Boris has. Alexey's goal is to minimize the score, and Boris wants to maximize it.

Write a program that calculates the score of the game if both players use their optimal strategies.

입력

The first line contains three integers nn, mm, kk, the number of utahraptors obtained by Alexey, the number of utahraptors obtained by Boris, and the number of turns in the game (1n,m,k31051 \le n, m, k \le 3 \cdot 10^5).

The second line contains nn integers a_ia\_i, denoting Alexey's utahraptors (0a_i10 \le a\_i \le 1). If a_i=0a\_i = 0, then the ii-th utahraptor is yellow, otherwise the ii-th utahraptor is red.

The third line contains mm integers b_ib\_i, denoting Boris's utahraptors in the same manner as described above (0b_i10 \le b\_i \le 1).

The fourth line contains kk integers s_is\_i, describing the numbers of utahraptors that players give to each other on the ii-th turn (1s_iminn,m1 \le s\_i \le \min\\{n, m\\}).

출력

Print the score of the game if both players play optimally.