Language: C++

package main

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

const (
	maxBufSize = 1024 * 1024
)

var (
	sc = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, 1)
		sc.Buffer(buf, maxBufSize)
		sc.Split(bufio.ScanWords)
		return sc
	}()
	out = bufio.NewWriter(os.Stdout)
)

func solve(n int64, as []int64) []int64 {
	t := int64(0)
	for _, a := range as {
		t = t ^ a
	}
	rs := make([]int64, n)
	for i, a := range as {
		rs[i] = a ^ t
	}
	return rs
}

func main() {
	defer out.Flush()

	n := nextInt()
	as := nextInts(n)
	res := solve(n, as)
	for i, r := range res {
		if i != 0 {
			fmt.Fprint(out, " ")
		}
		fmt.Fprint(out, r)
	}
	fmt.Fprintln(out)
}

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

func nextStringAsBytes() []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:22:11: error: expected unqualified-id before ')' token
   22 |         }()
      |           ^
a.cc:38:1: error: 'func' does not name a type
   38 | func main() {
      | ^~~~
a.cc:53:1: error: 'func' does not name a type
   53 | func next() string {
      | ^~~~
a.cc:58:1: error: 'func' does not name a type
   58 | func nextStringAsBytes() []byte {
      | ^~~~
a.cc:63:1: error: 'func' does not name a type
   63 | func nextInt() int64 {
      | ^~~~
a.cc:68:1: error: 'func' does not name a type
   68 | func nextFloat() float64 {
      | ^~~~
a.cc:73:1: error: 'func' does not name a type
   73 | func nextInts(n int64) []int64 {
      | ^~~~
a.cc:81:1: error: 'func' does not name a type
   81 | func nextFloats(n int64) []float64 {
      | ^~~~
a.cc:88:1: error: 'func' does not name a type
   88 | func nextStrings(n int64) []string {
      | ^~~~
a.cc:96:1: error: 'func' does not name a type
   96 | func containStr(arr []string, target string) bool {
      | ^~~~
a.cc:105:1: error: 'func' does not name a type
  105 | func PrintOut(src interface{}, joinner string) {
      | ^~~~
a.cc:105:30: error: expected unqualified-id before ',' token
  105 | func PrintOut(src interface{}, joinner string) {
      |                              ^
a.cc:105:40: error: expected constructor, destructor, or type conversion before 'string'
  105 | func PrintOut(src interface{}, joinner string) {
      |                                        ^~~~~~
a.cc:123:1: error: 'func' does not name a type
  123 | func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
      | ^~~~
a.cc:123:37: error: expected unqualified-id before ']' token
  123 | func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
      |                                     ^
a.cc:123:49: error: expected unqualified-id before ')' token
  123 | func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
      |                                                 ^
a.cc:123:78: error: expected unqualified-id before ')' token
  123 | func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
      |                                                                              ^