|
0
for question F: i guess this is correct: first : let vc[i] = {b[i] — a[i], i}; second: sort vc; ans = sum = segma(llabs(vc[i].first)); third: enumerate vc[0].second whith i from 1 to n, let ans = min(ans, sum — diff); last : enumerate vc[n — 1].second whith i from 1 to n, let ans = min(ans, sum — diff); it can pass all test, but i cannot prove it, who can give a prove? submit code: https://mirror.codeforces.com/contest/1513/submission/112733065 |