/in/foo.cc: In function 'std::tuple<__int128, __int128, __int128> extended_gcd(i64, i64)':
/in/foo.cc:13:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
13 | auto [g, x1, y1] = extended_gcd(b, a % b);
| ^
/in/foo.cc: In function 'bool particular_solution(i64, i64, i64, i64&, i64&)':
/in/foo.cc:18:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
18 | auto [g, x, y] = extended_gcd(p, q);
| ^
/in/foo.cc: In function 'i64 step_cost(i64, i64, i64, i64, i64, i64, i64, i64)':
/in/foo.cc:31:29: error: call of overloaded 'abs(i64&)' is ambiguous
31 | return std::max(std::abs(Cap), std::abs(Cbq)) + std::max(std::abs(Caq), std::abs(Cbp));
| ~~~~~~~~^~~~~
In file included from /usr/include/c++/12/cstdlib:75,
from /usr/include/c++/12/ext/string_conversions.h:41,
from /usr/include/c++/12/bits/basic_string.h:3960,
from /usr/include/c++/12/string:53,
from /usr/include/c++/12/bits/locale_classes.h:40,
from /usr/include/c++/12/bits/ios_base.h:41,
from /usr/include/c++/12/ios:42,
from /usr/include/c++/12/ostream:38,
from /usr/include/c++/12/iostream:39,
from /in/foo.cc:1:
/usr/include/stdlib.h:861:12: note: candidate: 'int abs(int)'
861 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
In file included from /usr/include/c++/12/cstdlib:77:
/usr/include/c++/12/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
/usr/include/c++/12/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/12/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/12/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/12/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
/in/foo.cc:31:44: error: call of overloaded 'abs(i64&)' is ambiguous
31 | return std::max(std::abs(Cap), std::abs(Cbq)) + std::max(std::abs(Caq), std::abs(Cbp));
| ~~~~~~~~^~~~~
/usr/include/stdlib.h:861:12: note: candidate: 'int abs(int)'
861 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
/usr/include/c++/12/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
/usr/include/c++/12/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/12/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/12/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/12/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
/in/foo.cc:31:70: error: call of overloaded 'abs(i64&)' is ambiguous
31 | return std::max(std::abs(Cap), std::abs(Cbq)) + std::max(std::abs(Caq), std::abs(Cbp));
| ~~~~~~~~^~~~~
/usr/include/stdlib.h:861:12: note: candidate: 'int abs(int)'
861 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
/usr/include/c++/12/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
/usr/include/c++/12/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/12/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/12/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/12/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
/in/foo.cc:31:85: error: call of overloaded 'abs(i64&)' is ambiguous
31 | return std::max(std::abs(Cap), std::abs(Cbq)) + std::max(std::abs(Caq), std::abs(Cbp));
| ~~~~~~~~^~~~~
/usr/include/stdlib.h:861:12: note: candidate: 'int abs(int)'
861 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
/usr/include/c++/12/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
/usr/include/c++/12/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/12/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/12/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/12/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
/in/foo.cc: In function 'i64 minimal_steps(i64, i64, i64, i64)':
/in/foo.cc:53:18: error: 'gcd' is not a member of 'std'
53 | i64 d = std::gcd(p, q);
| ^~~