|  | @@ -5,6 +5,7 @@ import (
 | 
											
												
													
														|  |  	"fmt"
 |  |  	"fmt"
 | 
											
												
													
														|  |  	"log"
 |  |  	"log"
 | 
											
												
													
														|  |  	"os"
 |  |  	"os"
 | 
											
												
													
														|  | 
 |  | +	"sort"
 | 
											
												
													
														|  |  	"strings"
 |  |  	"strings"
 | 
											
												
													
														|  |  )
 |  |  )
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -76,6 +77,14 @@ func plot(plan []Dig) []Point {
 | 
											
												
													
														|  |  		result = append(result, current.getPoints(plan[i])...)
 |  |  		result = append(result, current.getPoints(plan[i])...)
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +	sort.Slice(result, func(i, j int) bool {
 | 
											
												
													
														|  | 
 |  | +		if result[i].y == result[j].y {
 | 
											
												
													
														|  | 
 |  | +			return result[i].x < result[j].x
 | 
											
												
													
														|  | 
 |  | +		}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +		return result[i].y < result[j].y
 | 
											
												
													
														|  | 
 |  | +	})
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  	return result
 |  |  	return result
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 |