diff --git a/algorithms/geometry/geometry_functions.cpp b/algorithms/geometry/geometry_functions.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..97b6abecaad422be0d0dddcfeda0a42512d3041f
--- /dev/null
+++ b/algorithms/geometry/geometry_functions.cpp
@@ -0,0 +1,22 @@
+/**
+ * Geometry functions
+ */
+
+struct Vector {
+  double x, y; 
+
+  Vector(double x, double y) : x(x), y(y) {}
+
+  double dot_product(Vector v) { return x * v.x + y * v.y; }
+  double cross_product(Vector v) { return x * v.y - v.x * y; }
+
+  /**
+   * Returns angle between this and v.
+   */
+  double angle(Vector v) {
+
+    // atan2(y, x) is in the range [-180,180]. To get [0, 360], 
+    // atan2(-y, -x) + 180 is used
+    return ((atan2(-cross_product(v), -dot_product(v)) * 180.0) / M_PI) + 180.0;
+  }
+};
diff --git a/contests/ICPC_LA18/A.cpp b/contests/ICPC_LA18/A.cpp
index a044d3562ca72cb0cc97d678f273087b0e4bc556..7be4b8517fae73ef88bb5956299342f918aa1efb 100644
--- a/contests/ICPC_LA18/A.cpp
+++ b/contests/ICPC_LA18/A.cpp
@@ -19,7 +19,6 @@ using namespace std;
 using ll = long long;
 using ii = pair<int,int>;
 
-
 int main() {
   ios::sync_with_stdio(0);
   cin.tie(0);
@@ -27,6 +26,7 @@ int main() {
   string s; cin >> s;
   s.erase(s.begin() + s.size() - 3);
   stringstream x(s);
+
   int r; x >> r;
   cout << 36000 / __gcd(36000, r) << ende;
 
diff --git a/contests/ICPC_LA18/B.cpp b/contests/ICPC_LA18/B.cpp
index af4e17d4693d8ada8ad58068950664265245aa63..86e86c27e9d1b9b967cc73c591ccfe1261a9c1e2 100644
--- a/contests/ICPC_LA18/B.cpp
+++ b/contests/ICPC_LA18/B.cpp
@@ -34,17 +34,16 @@ int main() {
   if (pref.back() % 2) 
     return cout << "N" << ende, 0;
 
-  int beg = 0;
-  vector<ii> found;
+  int beg = 0, ans = 0;
   for (int i = 0; i < n; ++i) {
     while (beg < i && pref[i] - pref[beg] > pref.back() / 2)
       beg++;
 
     if (pref[i] - pref[beg] == (pref.back() / 2))
-      found.pb(ii(beg, i));
+      ans++;
   }
 
-  if (found.size() >= 2)
+  if (ans >= 2)
     cout << "Y" << ende;
   else
     cout << "N" << ende;
diff --git a/contests/ICPC_LA18/C.cpp b/contests/ICPC_LA18/C.cpp
index cf661800c5ca044e4c401e55ddb650caebff233d..2394c73edc5898a9b7af88110415bffeadf20003 100644
--- a/contests/ICPC_LA18/C.cpp
+++ b/contests/ICPC_LA18/C.cpp
@@ -25,8 +25,7 @@ int d[MAX], c[MAX];
 int dp[MAX][6][123];
 
 int fix(int x) {
-  if (x > 120) return 121;
-  else return x;
+  return min(x, 121);
 }
 
 int solve(int i, int state, int mi) {
diff --git a/contests/ICPC_LA18/D.py b/contests/ICPC_LA18/D.py
index c536ec00a427e4ecde92c65025c29d09a4e69d3f..7032c5f8259fc1b3ec0a737640486ee23d0d413f 100644
--- a/contests/ICPC_LA18/D.py
+++ b/contests/ICPC_LA18/D.py
@@ -1,7 +1,6 @@
 n = int(input())
 every = []
 for i in range(n):
-    s = input()
-    x = s.split('@')
+    x = input().split('@')
     every += [ x[0].split('+')[0].replace('.','') + x[1] ]
 print(len(set(every)))
diff --git a/contests/ICPC_LA18/E.cpp b/contests/ICPC_LA18/E.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..83a7595d2eee6869bfd6a9972dd301b731af5918
--- /dev/null
+++ b/contests/ICPC_LA18/E.cpp
@@ -0,0 +1,60 @@
+#include <bits/stdc++.h>
+
+#define EPS 1e-6
+#define MOD 1000000007
+#define inf 0x3f3f3f3f
+#define llinf 0x3f3f3f3f3f3f3f3f
+
+#define fi first
+#define se second
+#define pb push_back
+#define ende '\n'
+
+#define all(x) (x).begin(), (x).end()
+#define rall(x) (x).rbegin(), (x).rend()
+#define mset(x, y) memset(&x, (y), sizeof(x))
+
+using namespace std; 
+
+using ll = long long;
+using ii = pair<int,int>;
+
+struct Point {
+  double x, y;
+  Point() {}
+  Point(double x, double y) : x(x), y(y) {}
+  Point operator-(Point a) { return Point(x - a.x, y - a.y); }
+};
+
+int main() {
+  ios::sync_with_stdio(0);
+  cin.tie(0);
+
+  ll n; cin >> n;
+  vector<Point> v(n);
+  for (auto &i : v) 
+    cin >> i.x >> i.y;
+
+  ll ans = (n * (n - 1LL) * (n - 2LL)) / 6LL;
+  for (int i = 0; i < n; ++i) {
+    ll l = i + 1, r = i + n - 1;
+
+    for (int j = 0; j < 20; ++j) {
+      ll m = (l + r) / 2;
+
+      Point a = v[(i+1)%n] - v[i];
+      Point b = v[(m+1)%n] - v[m%n];
+
+      double ang = (atan2(-(a.x*b.y - a.y*b.x), -(a.x*b.x + a.y*b.y)) * 180.0) / M_PI + 180.0;
+      if (ang > 180.0) 
+        r = m;
+      else 
+        l = m;
+    }
+
+    ans -= ((l - i) * (l - i - 1LL)) / 2LL;
+  }
+
+  cout << ans << ende;
+  return 0;
+}
diff --git a/contests/ICPC_LA18/L.cpp b/contests/ICPC_LA18/L.cpp
index 134cd18983eb62544aa60a420c5e6a6ef27b4a2e..af7e048908cca1eca13de6a61c98a5925c14f0c9 100644
--- a/contests/ICPC_LA18/L.cpp
+++ b/contests/ICPC_LA18/L.cpp
@@ -107,7 +107,9 @@ int main() {
   for (auto i : que) {
     while (curr >= 0 && primes[curr] > i.fi.fi) {
       for (int j = primes[curr]; j <= N; j += primes[curr])
-        if (query(j, j) != 0) update(j, -1);
+        if (query(j, j) != 0) 
+          update(j, -1);
+
       curr--;
     }
 
diff --git a/contests/ICPC_LA18/M.cpp b/contests/ICPC_LA18/M.cpp
index 9813471fe693e015ec31e50de7fd2b92197c4e5a..b8db631e1dede361906fbf7588990832128fe489 100644
--- a/contests/ICPC_LA18/M.cpp
+++ b/contests/ICPC_LA18/M.cpp
@@ -19,21 +19,19 @@ using namespace std;
 using ll = long long;
 using ii = pair<int,int>;
 
-
 int main() {
   ios::sync_with_stdio(0);
   cin.tie(0);
 
   int n; cin >> n;
-  int past = 0;
-  int ans = 0;
+  int past = 0, ans = 0;
   for (int i = 0; i < n; ++i) {
     int x; cin >> x;
     if (x > past)
       ans++;
     past = x;
   }
-  cout << ans << ende;
 
+  cout << ans << ende;
   return 0;
 }
diff --git a/contests/ICPC_LA18/out b/contests/ICPC_LA18/out
deleted file mode 100644
index 8a7ce29a78a4449142fc2ad93f177deb4f7cb51a..0000000000000000000000000000000000000000
--- a/contests/ICPC_LA18/out
+++ /dev/null
@@ -1 +0,0 @@
-361391