Original Post
Hello. I typically have a good working knowledge of C++ but this question is driving me nuts. What (standard) library do I include in order to access some sort of C++ gcd function? I use C++ primarily in algorithm competitions and cut/paste of code is not allowed, and having to reimplement euclid's algorithm each new problem can be cumbersome. Any thoughts? I tried including a slew of libraries but none of them seemed to recognise a "gcd" or "gcf" function.