Codeforces 652C Foe Pairs 【dp】
C. Foe Pairstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutation p of length n. Also you are given ...