The potato problem

All submissions for this problem are available.
Read problems statements in Mandarin Chinese, Russian and Vietnamese as well.
A 1concave polygon is a simple polygon (its sides don't intersect or touch) which has at least 1 concave interior angle.
There are N points on a plane. Let S be the maximum area of a 1concave polygon with vertices in those points. Compute 2S. Note that if there is no such (1concave) polygon, you should print 1.
Input
 The first line of the input contains an integer T  the number of test cases.
 The first line of each test case contains N  the number of points.
 Each of the following N lines contains two integers x and y  the coordinates of a point.
Output
If there's no 1concave polygon, print 1. Otherwise, print one integer: twice the area of the largest one (it's guaranteed to be an integer under these constraints).
Constraints
 1 ≤ T ≤ 100
 3 ≤ N ≤ 10^{5}
 No two points coincide (have identical both x and y coordinates).
 No three points are collinear.
 The sum of N over all test cases won't exceed 5·10^{5}.
 x,y ≤ 10^{9}
Example
Input: 2 5 2 2 2 2 2 2 2 2 0 1 3 0 0 1 0 0 1 Output: 28 1
Author:  xellos0 
Tester:  antoniuk1 
Editorial  http://discuss.codechef.com/problems/KTHCON 
Tags  convexhull, cook68, geometry, medium, twopointers, xellos0 
Date Added:  1032016 
Time Limit:  2 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.5, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 