Skip to content

Instantly share code, notes, and snippets.

@johnchen902
Last active August 29, 2015 14:15
Show Gist options
  • Save johnchen902/3d649f33365d25796d05 to your computer and use it in GitHub Desktop.
Save johnchen902/3d649f33365d25796d05 to your computer and use it in GitHub Desktop.
Suggested Edit
int[] sc = new int[36]; int sum = 0;
for (int i = 0; i < 6; i++)
sc[i * 6 + (5 - i)] = i;
for (int i = 0; i < gC.length; i++) {
for (int j = 0; j < 6; j++) {
sc[j * 6 + t[i]] += j + t[i];
sc[g[i] * 6 + j] -= g[i] + t[i]; } }
for (int m = 0; m < 36; m++) {
if (sc[m] < 1) sc[m] = 1; sc[m] *= sc[m];
sum += sc[m]; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment