code: void rot(int n, int[] xy, int rx, int ry) {
          if (ry == 0) {
              if (rx == 1) {
                  xy[0] = n - 1 - xy[0];
                  xy[1] = n - 1 - xy[1];
              }
              int t = xy[0];
              xy[0] = xy[1];
              xy[1] = t;
          }
      }
docs: rotate/flip a quadrant appropriately