結果

問題 No.239 にゃんぱすー
ユーザー tsuchinagatsuchinaga
提出日時 2019-02-23 08:38:34
言語 Go
(1.21.3)
結果
AC  
実行時間 148 ms / 2,000 ms
コード長 509 bytes
コンパイル時間 11,325 ms
コンパイル使用メモリ 207,764 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-18 20:03:16
合計ジャッジ時間 15,402 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 5 ms
4,380 KB
testcase_10 AC 7 ms
4,376 KB
testcase_11 AC 11 ms
4,376 KB
testcase_12 AC 15 ms
4,376 KB
testcase_13 AC 19 ms
4,376 KB
testcase_14 AC 24 ms
4,380 KB
testcase_15 AC 31 ms
4,376 KB
testcase_16 AC 37 ms
4,376 KB
testcase_17 AC 42 ms
4,376 KB
testcase_18 AC 52 ms
4,380 KB
testcase_19 AC 61 ms
4,376 KB
testcase_20 AC 71 ms
4,380 KB
testcase_21 AC 83 ms
4,380 KB
testcase_22 AC 96 ms
4,376 KB
testcase_23 AC 106 ms
4,376 KB
testcase_24 AC 121 ms
4,376 KB
testcase_25 AC 133 ms
4,376 KB
testcase_26 AC 147 ms
4,380 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 7 ms
4,376 KB
testcase_29 AC 14 ms
4,376 KB
testcase_30 AC 26 ms
4,376 KB
testcase_31 AC 41 ms
4,376 KB
testcase_32 AC 54 ms
4,380 KB
testcase_33 AC 73 ms
4,376 KB
testcase_34 AC 93 ms
4,376 KB
testcase_35 AC 117 ms
4,380 KB
testcase_36 AC 148 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import "fmt"

func main() {
	n := 0
	s, t := "", "nyanpass"
	_, _ = fmt.Scan(&n)

	g := make([][]string, n)
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			_, _ = fmt.Scan(&s)

			if i == j {
				continue
			}
			g[j] = append(g[j], s)
		}
	}

	m := -2
	for i, gg := range g {
		r := true
		for _, ggg := range gg {
			if t != ggg {
				r = false
				break
			}
		}

		if r {
			if m < 0 {
				m = i
			} else if m != i {
				fmt.Println(-1)
				return
			}
		}
	}
	fmt.Println(m + 1)
}
0