/
a.go
54 lines (44 loc) · 783 Bytes
/
a.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package main
import (
"bufio"
"fmt"
"io"
"os"
"strconv"
)
var sc *bufio.Scanner
const BufferSize = 1024
func nextInt() int {
if !sc.Scan() {
panic(nil)
}
i, e := strconv.Atoi(sc.Text())
if e != nil {
panic(e)
}
return i
}
var production bool
func debugf(format string, v ...interface{}) {
if !production {
fmt.Printf(format, v...)
}
}
func answer(reader io.Reader, writer io.Writer) {
sc = bufio.NewScanner(reader)
buf := make([]byte, BufferSize)
sc.Buffer(buf, 1e+6)
sc.Split(bufio.ScanWords)
a := nextInt()
b := nextInt()
c := nextInt()
if (a == b || b == c || c == a) && !(a == b && b == c) {
_, _ = fmt.Fprintf(writer, "Yes")
} else {
_, _ = fmt.Fprintf(writer, "No")
}
}
func main() {
production = true
answer(os.Stdin, os.Stdout)
}