Problem / game
First name
Vihaan goyal
School
Singapore American school
Country
Age
11
File
I am using a trick called the manhattan distance to solve those question. The manhattan distance states in a 3d plane D=|x-x_t|+|y-y_t|+|z-z_t|. Using this I will find the x coordinates in terms of d terms. First guess(0,0,0)
(0,0,0) s1
D1=x_t+y_t+z_t
(N,0,0)
X_t is less than or equal to n so |n-x_t| is n-x_t
D2=(n-x_t)+y_t+z_t
D1-d2=2x_t-n. X_t=((D1-D2)+n)/2
(0,n,0)
D3=x_t+(n-y_t)+z_t
D1-D3=2y_t-n y_t=((D1-D3+N))/2
So z=D1-x_t-y_t
Answer is (D1-D2+N/2,D1-D3+N/2,D1-X_t- y_t)