Pythagorean quadruples | Rosetta Code | #9
URL to the problem page: https://rosettacode.org/wiki/Pythagorean_quadruples One form of Pythagorean quadruples is (for positive integers a, b, c, and d): a 2 + b 2 + c 2 = d 2 An example: 2 2 + 3 2 + 6 2 = 7 2 which is: 4 + 9 + 36 = 49 For positive integers up 2,200 (inclusive), for all values of a, b, c, and d, find (and show here) those values of d that can't be represented. (Note: this task takes too much time if you compile the program in Debug Mode/x86. I recommend to compile the program in Release Mode/x64, and with the OpenMP if possible. (by including <omp.h> library, enabling OpenMP from the project settings and using " #pragma omp parallel for " in the code.) Because it reduces the amount of time to complete the task even more.) #include <iostream> #include <omp.h> using namespace std ; int main () { #pragma omp parallel for ...