#include <iostream> #include <string> using namespace std; int getting(int x, int y){ int value = -1; int m = x/2; if(x%2 == 0){ if(x == y){ value = 4*m; } else if(x -y == 2){ value = 4*m -2; } } else if(x%2 == 1){ if(x == y){ value = 4*m +1; } else if(x == y+2){ value = 4*m -1; } } retu...