Welcome to ZOJ
Select Problem
ZOJ Problem Set - 3871
Convex Hull

Time Limit: 2 Seconds      Memory Limit: 65536 KB

Edward has n points on the plane. He picks a subset of points (at least three points), and defines the beauty of the subset as twice the area of corresponding convex hull. Edward wants to know summation of the beauty of all possible subsets of points (at least three points).

No two points coincide and no three points are on the same line.


There are multiple test cases. The first line of input contains an integer T indicating the number of test cases. For each test case:

The first line contains an integer n (3 ≤ n ≤ 1000). Each of following n lines contains 2 integers xi, yi which denotes a point (xi, yi) (0 ≤ |xi|, |yi| ≤ 109).

The sum of values n for all the test cases does not exceed 5000.


For each case, if the answer is S, output a single integer denotes S modulo 998244353.

Sample Input

0 0
0 1
1 0

Sample Output


Author: LIN, Xi
Source: The 12th Zhejiang Provincial Collegiate Programming Contest
Submit    Status