cpp-variadics/problem?
#include
using namespace std;
// Enter your code for reversed_binary_value()
template int reversed_binary_value() { return a; }
template int reversed_binary_value() {
return (reversed_binary_value() << 1) + a;
}
template
struct CheckValues {
static void check(int x, int y)
{
CheckValues::check(x, y);
CheckValues::check(x, y);
}
};
template
struct CheckValues<0, digits...> {
static void check(int x, int y)
{
int z = reversed_binary_value();
std::cout << (z+64*y==x);
}
};
int main()
{
int t; std::cin >> t;
for (int i=0; i!=t; ++i) {
int x, y;
cin >> x >> y;
CheckValues<6>::check(x, y);
cout << "\n";
}
}
|