func_code_string: #include <bits/stdc++.h>   using namespace std;   namespace math {   template <typename T>   T gcd(T a, T b) {     if (a < 0) a = -a;     if (b < 0) b = -b;     while (b > 0) {       T r = a % b;       a = b;       b = r;     }     return a;   }   }  // namespace math   template <typename C>   int SZ(const C& c) {     return (int)c.size();   }   template <size_t n, class... Types>   struct TupleHashHelper {     static std::size_t calc(const std::tuple<Types...>& t) {       using std::size_t;       std::hash<typename std::tuple_element<n - 1, std::tuple<Types...>>::type>           elemHash;       return elemHash(std::get<n - 1>(t)) +              31013 * TupleHashHelper<n - 1, Types...>::calc(t);     }   };   template <class... Types>   struct TupleHashHelper<0, Types...> {     static std::size_t calc(const std::tuple<Types...>&) { return 0; }   };   template <class... Types>   struct TupleHash {     std::size_t operator()(const std::tuple<Types...>& t) const {       static const size_t n = std::tuple_size<std::tuple<Types...>>::value;       return TupleHashHelper<n, Types...>::calc(t);     }   };   class Solution {    public:     void solve(std::istream& in, std::ostream& out) {       int n;       in >> n;       vector<int> x(n), y(n);       for (int i = 0; i < n; ++i) in >> x[i] >> y[i];       unordered_map<tuple<int, int, int>, set<int>, TupleHash<int, int, int>>           lines;       for (int i = 0; i < n; ++i)         for (int j = i + 1; j < n; ++j) {           using math::gcd;           int a = y[j] - y[i], b = x[i] - x[j];           int c = -a * x[i] - b * y[i];           int d = gcd(gcd(a, b), c);           if (a < 0) {             a = -a;             b = -b;             c = -c;           } else if (a == 0 && b < 0) {             b = -b;             c = -c;           }           auto t = make_tuple(a / d, b / d, c / d);           lines[t].insert(i);           lines[t].insert(j);         }       long long res = (long long)n * (n - 1) * (n - 2) / 6;       for (const auto& p : lines) {         long long s = SZ(p.second);         res -= s * (s - 1) * (s - 2) / 6;       }       out << res << endl;     }   };   void solve(std::istream& in, std::ostream& out) {     out << std::setprecision(12);     Solution solution;     solution.solve(in, out);   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     istream& in = cin;     ostream& out = cout;     solve(in, out);     return 0;   }   