結果

問題 No.975 ミスターマックスバリュ
ユーザー 👑 naipianaipia
提出日時 2020-01-31 21:25:01
言語 Go
(1.22.1)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 1,298 bytes
コンパイル時間 15,817 ms
コンパイル使用メモリ 211,256 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 08:36:58
合計ジャッジ時間 16,580 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 5 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

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

//•*¨*•.¸¸♪I/O•*¨*•.¸¸♪

var (
	sc = bufio.NewScanner(os.Stdin)
	wr = bufio.NewWriter(os.Stdout)
)

func scanInt() int {
	sc.Scan()
	a,_ := strconv.Atoi(sc.Text())
	return a
}

func scanInt64() int64 {
	sc.Scan()
	a,_ := strconv.ParseInt(sc.Text(),10,64)
	return a
}

func scanFloat64() float64 {
	sc.Scan()
	a,_ := strconv.Atoi(sc.Text())
	return float64(a)
}

func scanInts(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ { res[i] = scanInt() }
	return res
}

func scanText() string {
	sc.Scan()
	return sc.Text()
}

func printInts(a ...int) {
	for i, e := range a {
		fmt.Fprint(wr, e)
		if i != len(a)-1 { fmt.Fprint(wr, " ") }
	}
	fmt.Fprintln(wr)
	wr.Flush()
}

//•*¨*•.¸¸♪Main•*¨*•.¸¸♪( -ω-)ノ ( ・ω・)

func main() {
	sc.Split(bufio.ScanWords)
	// sc.Buffer(make([]byte, 10000), 100000000)

	x := scanInt()
	n := scanInt()
	m := scanInt()
	a := scanInts(n)
	b := scanInts(m)

	f := false

	for i := 0; i < n; i++ {
		if a[i] == x {
			f = true
			break
		}
	}

	for i := 0; i < m; i++ {
		if b[i] == x {
			if f {
				fmt.Println("MrMaxValu")
			} else {
				fmt.Println("MaxValu")
			}
			return
		}
	}

	if f {
		fmt.Println("MrMax")
	} else {
		fmt.Println(-1)
	}

}
0