SP4485 MOBIVINA - MobiZone vs VinaGone
Description
[English](/problems/MOBIVINA/en/) [Tiếng Việt](/problems/MOBIVINA/vn/)KTuan and AnhDQ, CEOs of two telecommunication corporations MobiZone and VinaGone have signed a contract to use their network in common. N people have accepted to try this new service. The i $ ^{th} $ people accepts to pay M $ _{i} $ to use MobiZone's service or V $ _{i} $ to use VinaGone's one; and any two people i $ ^{th} $ and j $ ^{th} $ accept to pay C $ _{ij} $ in common whether they use different services (the network cost).
Input Format
\- The first line contains number N.
\- The second line contains N number(s) M $ _{i} $ .
\- The third line contains N number(s) V $ _{i} $ .
\- The last N line(s), each of them contains N number(s) C $ _{ij} $ (C $ _{ij} $ = C $ _{ji} $ ).
Output Format
\- Contains the minimum total cost.