G: Cuboid Slicing Game
https://open.kattis.com/contests/s82cve/problems/cuboidslicinggame
dp = 31 x 31 x 31 array of all 0s
for x,y,z from 1,1,1 to 30,30,30:
mex = 30 * 30 * 30 boolean array initialized to false
for i,j,k from 0,0,0 to x,y,z:
# cut the cuboid by removing the sections for which i <= x <= i+1, j <= y <= j+1, etc
nimber_after_move = dp[i][j][k] ^ dp[x-1-i][j][k] ^ dp[i][y-1-j][k] ^ ... ^ dp[x-1-i][y-1-j][z-1-k]
mex[nimber_after_move] = true
ans = first index in mex corresponding to false
dp[x][y][z] = ansLast updated