結果

問題 No.3061 uxs hxixtya pyuyn ixc hyixa kxuyn
ユーザー 👑 naipianaipia
提出日時 2020-04-01 23:56:07
言語 Go
(1.22.1)
結果
WA  
実行時間 -
コード長 1,430 bytes
コンパイル時間 11,339 ms
コンパイル使用メモリ 203,016 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-09 20:23:16
合計ジャッジ時間 12,488 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 1 ms
4,380 KB
testcase_23 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

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

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

func scanString() string   { sc.Scan(); return sc.Text() }
func scanRunes() []rune    { return []rune(scanString()) }
func scanInt() int         { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64     { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat64() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

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

func debug(a ...interface{}) { fmt.Fprintln(os.Stderr, a...) }

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

//•*¨*•.¸¸♪main•*¨*•.¸¸♪( -ω-)ノ ( ・ω・)
func main() {
	defer wr.Flush()
	// sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 10000), 1001001)

	s := scanString()
	cnt1 := map[rune]bool{}
	cnt2 := map[rune]bool{}

	if len(s) == 1 {
		fmt.Fprintln(wr, "NO")
		return
	}
	for i,v := range s {
		if i&1 == 0 {
			if v == ' ' {
				fmt.Fprintln(wr, "NO")
				return
			}
			cnt1[v] = true
		} else {
			cnt2[v] = true
		}
	}

	for e := range cnt1 {
		if cnt2[e] {
			fmt.Fprintln(wr, "NO")
			return
		}
	}

	fmt.Fprintln(wr, "Yes")

}
0