Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
6x6 Hotel Key Card Counter mod
/*
Ref: https://gist.github.com/skeeto/1718d6613dc47a7aff13333942a40776
*/
static long long
valid(long long x)
{
int v = 0;
long long a = transpose(x);
v += x == a;
a = flipv(a);
v += x == a;
a = transpose(a);
v += x == a;
a = flipv(a);
v += x == a;
a = transpose(a);
v += x == a;
a = flipv(a);
v += x == a;
a = transpose(a);
v += x == a;
return !v;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment