#BZOJ4994. Why Did the Cow Cross the Road III

Why Did the Cow Cross the Road III

题目描述

给定长度为2N的序列,1~N各处现过2次,i第一次出现位置记为ai,第二次记为bi,求满足ai<aj<bi<bj的对数

4 3 2 4 4 1 3 2 1
3

数据范围与约定

N<=100000