|  | 
|  | 
| вернуться в форум | test case 7 2019 17 15 13 11 9 7 5 3 1 2 4 6 8 10 12 14 16 18 20
 
 ans:
 5
 17 13 9 5 1 2 6 8 10 12 14 16 18 20 4 3 7 11 15 19
 1 2 8 12 16 20 7 11 15 19 3 4 18 14 10 6 5 9 13 17
 1 2 12 20 11 19 3 4 18 10 9 17 13 5 6 14 15 7 16 8
 1 2 20 19 3 4 18 17 5 6 7 8 16 15 14 13 9 10 11 12
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
 
 I don't have test only use handle binary search get the test, and find answer with eyes...
 my programme output 6,so it must be smaller than 6...
Re: test case 7 finally I get AC,  it is O(n*lg(n)) sol | 
 | 
|