Tap here to switch tabs
Problem
Submissions

Problem: Minimum Generations to Target Point

Try to solve the Minimum Generations to Target Point problem.

Statement

You are given an array points, where each element points[i] =[xi,yi,zi]= [x_i, y_i, z_i] represents a point in three dimensional space, and an array target representing a target point.

At generation 00, the set of available points consists of all coordinates in points.

In each subsequent generation k≥1k \geq 1, a new point can be produced from any pair of distinct points p1=[x1,y1,z1]p_1 = [x_1, y_1, z_1] and p2=[x2,y2,z2]p_2 = [x_2, y_2, z_2] currently present in the set of available points. The coordinates of the new point are given by:

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Generations to Target Point

Try to solve the Minimum Generations to Target Point problem.

Statement

You are given an array points, where each element points[i] =[xi,yi,zi]= [x_i, y_i, z_i] represents a point in three dimensional space, and an array target representing a target point.

At generation 00, the set of available points consists of all coordinates in points.

In each subsequent generation k≥1k \geq 1, a new point can be produced from any pair of distinct points p1=[x1,y1,z1]p_1 = [x_1, y_1, z_1] and p2=[x2,y2,z2]p_2 = [x_2, y_2, z_2] currently present in the set of available points. The coordinates of the new point are given by: