Reinventing the wheel
Do not reinvent the wheel
Coprimes [ACM ICPC Regionals 2014 - Asia Anshan]
Given a sequence a of n integers () where (), find the number of triplets (x, y, z) such that they are either pairwise coprime, or pairwise not coprime, feel free to check the problem statement for more explanation.
Ever met a geometry problem that doesn’t have much to do with geometry ? this is the problem we want to discuss today, Mirror trap from the 15th Polish Olympiad in Informatics.