Maximum Crossings (Easy Version) solution codeforces

Maximum Crossings (Easy Version) solution codeforces The only difference between the two versions is that in this version n≤1000n≤1000 and the sum of nn over all test cases does not exceed 10001000. A terminal is a row of nn equal segments numbered 11 to nn in order. There are two terminals, one above the other. You are given an array aa of length nn. For all i=1,2,…,ni=1,2,…,n, there should be a straight … Read more