http://codeforces.com/gym/102222/problem/F
fory
#includeusing namespace std;typedef long long ll;#define lson root<<1,l,midd#define rson root<<<1|1,midd+1,r#define pb push_backconst int M=220;const int inf=0x3f3f3f3f;int a[M],b[M],dp[M][M][M];bool cmp(int x,int y){ return a[x] up) break; mubiao++; } printf("%d\n",dp[mubiao][u][v]); } } return 0;}