using
System;
class
GFG{
static
int
det(
int
x1,
int
y1,
int
x2,
int
y2,
int
x3,
int
y3)
{
return
(x1 * (y2 - y3) - y1 *
(x2 - x3) + 1 * (x2 *
y3 - y2 * x3));
}
static
int
countPoints(
int
[,] Point,
int
n)
{
int
result = 0;
for
(
int
i = 0; i < n; i++)
for
(
int
j = i + 1; j < n; j++)
for
(
int
k = j + 1; k < n; k++)
if
(det(Point[i,0], Point[i,1], Point[j,0], Point[j,1],Point[k,0], Point[k,1])>=0)
result = result + 1;
return
result;
}
public
static
void
Main()
{
int
[,] Point =
new
int
[,] { { 0, 0 }, { 1, 1 }, { 2, 0 }, { 2, 2 } };
int
n = Point.Length/Point.Rank;
Console.WriteLine(countPoints(Point, n));
}
}