MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / chmin

Function chmin

Codeforces_problems/Bargain/solution.cpp:57–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55template <typename T> T abs(T x) { return x < 0 ? -x : x; }
56template <typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
57template <typename T> bool chmin(T &x, const T& y) { if (x > y) { x = y; return true; } return false; }
58template <typename T> bool chmax(T &x, const T& y) { if (x < y) { x = y; return true; } return false; }
59
60auto random_address = [] { char *p = new char; delete p; return (uint64_t) p; };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected