← Home
For problem statement at 1000-1999/1900-1999/1950-1959/1956/problemC.txt this is a correct solution, but verifier at 1000-1999/1900-1999/1950-1959/1956/verifierC.go ends with test 1 failed
input:
2
2
3

expected:
7 3
1 2 1 2
2 1 1 2
1 1 1 2
22 5
1 3 1 2 3
2 2 1 2 3
1 2 1 2 3
2 1 1 2 3
1 1 1 2 3
got:
7 3
1 1 1 2
2 1 2 1
1 2 2 1
22 5
1 1 1 2 3
2 1 3 2 1
1 2 3 2 1
2 2 3 2 1
1 3 3 2 1
exit status 1 can you fix the verifier? ```go
package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	scanner.Scan()
	t, _ := strconv.Atoi(scanner.Text())
	for ; t > 0; t-- {
		scanner.Scan()
		n, _ := strconv.Atoi(scanner.Text())
		
		nn := int64(n)
		s := nn * (nn + 1) * (4*nn - 1) / 6
		
		fmt.Printf("%d %d\n", s, 2*n-1)
		
		fmt.Print("1 1")
		for j := 1; j <= n; j++ {
			fmt.Printf(" %d", j)
		}
		fmt.Println()
		
		for i := 1; i <= n-1; i++ {
			fmt.Printf("2 %d", i)
			for j := n; j >= 1; j-- {
				fmt.Printf(" %d", j)
			}
			fmt.Println()
			
			fmt.Printf("1 %d", i+1)
			for j := n; j >= 1; j-- {
				fmt.Printf(" %d", j)
			}
			fmt.Println()
		}
	}
}
```