Perfect Timing

In the Semiconductor industry timing is sometimes even more valuable than anywhere else. They want to roll out products faster than their competitors which means not just quick and responsive R&D, but fast and reliable factories. In these factories hundreds of different machines are working together in a highly efficient way, 24/7. If there is a slow machine, it can slow down the whole factory.

Your mission is to create a fast machine for the factory.

We have a list of measurement coordinates (X;Y), where the machine has to measure the sample. The speed of the X and the Y axis is 1mm/s, and they move together.

This machine contains 2 different measurement heads “A” and “B”. There are 3 different type of measurement points: only “A” measurement, only “B” measurement, “A” AND “B” measurement.

The measurement time of only “A” is 2 sec, only “B” is 3 sec. Switching time between “A” and “B” measurement is 60 sec, which is only possible on measurement site (not during movement).

The measurement head starting position is 0,0 and measurement head “A” is active.

Task

Find the fastest way, to measure at all given coordinates with the required measurement(s).

Input

X[mm]; Y[mm]: measurements head type(s) 20;40: A + B 73;158: A + B 99;146: B 79;172: A + B 5;198: A + B 7;105: A 45;158: A + B 2;191: B 54;10: B 29;153: A 34;15: A 68;40: B 31;90: B 27;180: A + B 74;4: A + B 74;93: A 35;109: A + B 5;125: A + B 80;59: B 36;56: A + B 64;68: B 92;66: A + B

Output

Text file with 33 rows, which contains coordinates (X;Y) and measurements head type (“A” or “B”).

example:

20;40: A 20;40: B 99;146: B 29;153: A
algorithm optimization coordinates continuous improvement

Criteria

  • All points are measured correctly
  • 1 point
  • The fastest measurement order
  • 9 points
  • 2 - 3 fastest measurement order
  • 6 points
  • 4 - 7 fastest measurement order
  • 4 points
  • 8 - 11 fastest measurement order
  • 3 points
  • 12 - 16 fastest measurement order
  • 2 points

Submission

Everyone’s results will be evaluated between 10:00 and 19:00.