← Home
For problem statement at 0-999/600-699/610-619/618/problemC.txt this is a correct solution, but verifier at 0-999/600-699/610-619/618/verifierC.go ends with All tests passed can you fix the verifier? ```go
package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

type Point struct {
	x, y int64
	idx  int
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	
	points := make([]Point, n)
	minIdx := 0
	
	for i := 0; i < n; i++ {
		scanner.Scan()
		x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
		scanner.Scan()
		y, _ := strconv.ParseInt(scanner.Text(), 10, 64)
		
		points[i] = Point{x, y, i + 1}
		if x < points[minIdx].x || (x == points[minIdx].x && y < points[minIdx].y) {
			minIdx = i
		}
	}
	
	pivot := points[minIdx]
	others := make([]Point, 0, n-1)
	for i := 0; i < n; i++ {
		if i != minIdx {
			others = append(others, points[i])
		}
	}
	
	sort.Slice(others, func(i, j int) bool {
		dx1 := others[i].x - pivot.x
		dy1 := others[i].y - pivot.y
		dx2 := others[j].x - pivot.x
		dy2 := others[j].y - pivot.y
		
		cross := dx1*dy2 - dy1*dx2
		if cross != 0 {
			return cross > 0
		}
		dist1 := dx1*dx1 + dy1*dy1
		dist2 := dx2*dx2 + dy2*dy2
		return dist1 < dist2
	})
	
	first := others[0]
	var second Point
	for i := 1; i < len(others); i++ {
		dx1 := first.x - pivot.x
		dy1 := first.y - pivot.y
		dx2 := others[i].x - pivot.x
		dy2 := others[i].y - pivot.y
		if dx1*dy2-dy1*dx2 != 0 {
			second = others[i]
			break
		}
	}
	
	fmt.Println(pivot.idx, first.idx, second.idx)
}
```