|  | 
|  | 
| back to board | I use unsigned long long and STL vector with very simple algorithm: store x1, x2, x3 in the vector, then find the minimal diffenrence and push it in the vector (repeat the process until minimal difference is 0). I got AC.I suppose that the tests are not strong enough. I wonder whether there is any test whose output is very large since I don's believe vector can store too many elements.
 P/S: I'm a beginner so I'm very glad to study from all of you :-)!
 The simulation works in O(logN), so your solution is correct | 
 | 
|