Language: C++

package main

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

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

func solve(s string, t string, a int64, b int64, u string) (int64, int64) {
	if u == s {
		a -= 1
	} else {
		b -= 1
	}
	return a, b
}

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()

	s := next()
	t := next()
	a := nextInt()
	b := nextInt()
	u := next()
	resA, resB := solve(s, t, a, b, u)
	fmt.Fprintln(out, resA, resB)
}

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

func nextStringAsBytes(n int64) []byte {
	sc.Scan()
	return []byte(sc.Text())
}

func nextInt() int64 {
	a, _ := strconv.ParseInt(next(), 10, 64)
	return a
}

func nextFloat() float64 {
	a, _ := strconv.ParseFloat(next(), 64)
	return a
}

func nextInts(n int64) []int64 {
	ret := make([]int64, n)
	for i := int64(0); i < n; i++ {
		ret[i] = nextInt()
	}
	return ret
}

func nextFloats(n int64) []float64 {
	ret := make([]float64, n)
	for i := int64(0); i < n; i++ {
		ret[i] = nextFloat()
	}
	return ret
}
func nextStrings(n int64) []string {
	ret := make([]string, n)
	for i := int64(0); i < n; i++ {
		ret[i] = next()
	}
	return ret
}

func containStr(arr []string, target string) bool {
	for _, v := range arr {
		if v == target {
			return true
		}
	}
	return false
}

func PrintOut(src interface{}, joinner string) {
	switch reflect.TypeOf(src).Kind() {
	case reflect.Slice:
		s := reflect.ValueOf(src)
		for idx := 0; idx < s.Len(); idx++ {
			fmt.Fprintf(out, "%v", s.Index(idx))
			if idx < s.Len()-1 {
				fmt.Fprintf(out, "%s", joinner)
			} else {
				fmt.Fprintln(out)
			}
		}
	default:
		fmt.Fprintln(out, "orz")
	}
}

// mapからkeysとvaluesを返す
func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
	switch reflect.TypeOf(m).Kind() {
	case reflect.Map:
		s := reflect.ValueOf(m)
		for _, v := range s.MapKeys() {
			keys = append(keys, v)
			values = append(values, s.MapIndex(v))
		}
	default:
		fmt.Fprintln(out, "orz")
	}
	return
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:23:1: error: 'func' does not name a type
   23 | func main() {
      | ^~~~
a.cc:36:1: error: 'func' does not name a type
   36 | func next() string {
      | ^~~~
a.cc:41:1: error: 'func' does not name a type
   41 | func nextStringAsBytes(n int64) []byte {
      | ^~~~
a.cc:46:1: error: 'func' does not name a type
   46 | func nextInt() int64 {
      | ^~~~
a.cc:51:1: error: 'func' does not name a type
   51 | func nextFloat() float64 {
      | ^~~~
a.cc:56:1: error: 'func' does not name a type
   56 | func nextInts(n int64) []int64 {
      | ^~~~
a.cc:64:1: error: 'func' does not name a type
   64 | func nextFloats(n int64) []float64 {
      | ^~~~
a.cc:71:1: error: 'func' does not name a type
   71 | func nextStrings(n int64) []string {
      | ^~~~
a.cc:79:1: error: 'func' does not name a type
   79 | func containStr(arr []string, target string) bool {
      | ^~~~
a.cc:88:1: error: 'func' does not name a type
   88 | func PrintOut(src interface{}, joinner string) {
      | ^~~~
a.cc:88:30: error: expected unqualified-id before ',' token
   88 | func PrintOut(src interface{}, joinner string) {
      |                              ^
a.cc:88:40: error: expected constructor, destructor, or type conversion before 'string'
   88 | func PrintOut(src interface{}, joinner string) {
      |                                        ^~~~~~
a.cc:106:1: error: 'func' does not name a type
  106 | func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
      | ^~~~
a.cc:106:37: error: expected unqualified-id before ']' token
  106 | func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
      |                                     ^
a.cc:106:49: error: expected unqualified-id before ')' token
  106 | func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
      |                                                 ^
a.cc:106:78: error: expected unqualified-id before ')' token
  106 | func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
      |                                                                              ^