Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Treap三秒钟水过……提供2组数据……

Posted by Ever_ljq at 2011-05-18 22:15:36 on Problem 2761 and last updated at 2011-05-18 22:20:12
Input:
10 10
7 6 2 4 0 8 3 6 5 3 
3 4 1
1 6 2
4 9 5
4 9 4
9 10 1
3 6 3
3 3 1
8 9 1
5 8 3
5 7 2
Output:
2
2
6
5
3
4
2
5
6
3


Input:
20 20
17 16 2 4 10 8 13 6 15 13 13 12 8 0 5 3 13 18 2 8 
10 14 4
10 15 5
16 19 1
3 16 7
3 8 1
11 18 7
14 15 2
3 16 10
12 17 6
2 7 1
4 18 13
3 8 3
9 11 1
19 20 1
2 20 3
2 19 12
8 20 1
2 3 1
13 20 5
6 12 6
Output:
13
13
2
8
2
13
5
12
13
2
13
6
13
2
2
13
0
2
8
13

其实,你也可以写个朴素对拍,我就是这么做的。

PS:这是目前为止我在POJ上交过的最长的程序了,写了4KB,值得纪念。


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator