Take a blank 6x6 grid (2-dimensional matrix). Pick a cell to start, and write the number 1 in that cell. Then move to an adjacent cell horizontally or vertically. Write 2 in that cell. Continue to move in the same manner, horizontally or vertically, incrementing the number in the cell by 1 each time. You terminate when you have the numbers 1 to 36 inclusive in the matrix. The rightmost column sums to 127. The bottommost row sums to 101. What is the route?
Partial answer, saving some thoughts.
Two families of configurations are ruled out:
Six consecutive numbers would sum up to $6k+3$, which neither of $127$ or $101$ is.
Two groups of three consecutive numbers would sum up to a multiple of $3$, which neither of $127$ or $101$ is.
The last row/column contain either three couples of consecutive numbers, or four consecutive numbers + two consecutive numbers, or the starting or ending point with whatever configuration besides.
A trickier family that is excluded:
Assume that all numbers from the last row are less than or equal to the bottom-right number (call it $k$), while all numbers from the last column are greater than or equal to $k$. Then $101\leq 6k-15$ and $6k+15\leq 127$, which is clearly impossible ($101$ and $127$ are too close to each other). Therefore our snake does some part of the bottom row, leaves it and does (potentially all but at least part of) the last column, and comes back to finish the last row.
Keep in mind that
when the second of the SW and NE corners is reached, meaning there is a path joining them, one of the two halves of the matrix (on either side of that path) has to be completely filled - otherwise we could not complete the square.