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

Function abs

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

Source from the content-addressed store, hash-verified

53
54template <typename T> T sqr(T x) { return x * x; }
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; }

Callers 15

solveFunction · 0.85
mainFunction · 0.85
PPATTERN.pyFile · 0.85
solveFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
solveFunction · 0.85
countGoodTripletsMethod · 0.85
calculateMinimumHPMethod · 0.85
findPosFunction · 0.85
mainFunction · 0.85
beautifulDaysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected