Language: C++

package main

import (
	"fmt"
)

const MOD = 1000000007

func ModAdd(a, b int64) int64 {
	return (a + b) % MOD
}

func ModMul(a, b int64) int64 {
	return a * b % MOD
}

func ModSub(a, b int64) int64 {
	r := (a%MOD - b%MOD) % MOD
	if r < 0 {
		r += MOD
	}
	return r
}

func ModDiv(a, b int64) int64 {
	return a % MOD * ModInv(b) % MOD
}

func ModPow(a, n int64) int64 {
	var r int64 = 1
	for n > 0 {
		if n&1 == 1 {
			r = r * a % MOD
		}
		a = a * a % MOD
		n >>= 1
	}
	return r
}

func ModInv(a int64) int64 {
	var b, u, v int64 = MOD, 1, 0
	for b > 0 {
		t := a / b
		a -= t * b
		a, b = b, a
		u -= t * v
		u, v = v, u
	}
	u %= MOD
	if u < 0 {
		u += MOD
	}
	return u
}

type Q struct {
	idx, value int
	a, b       int
	index      int
}

type QS []*Q

func (p QS) Len() int           { return len(p) }
func (p QS) Less(i, j int) bool { return p[i].value > p[j].value }
func (pq QS) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	pq[i].index = i
	pq[j].index = j
}

func (pq *QS) Push(x interface{}) {
	n := len(*pq)
	item := x.(*Q)
	item.index = n
	*pq = append(*pq, item)
}

func (pq *QS) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	old[n-1] = nil  // avoid memory leak
	item.index = -1 // for safety
	*pq = old[0 : n-1]
	return item
}

func main() {
	var A, B int
	fmt.Scanf("%d %d\n", &A, &B)
	diff := A + B
	if diff%2 == 0 {
		fmt.Println(diff / 2)
	} else {
		fmt.Println("IMPOSSIBLE")

	}
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:13:1: error: 'func' does not name a type
   13 | func ModMul(a, b int64) int64 {
      | ^~~~
a.cc:17:1: error: 'func' does not name a type
   17 | func ModSub(a, b int64) int64 {
      | ^~~~
a.cc:25:1: error: 'func' does not name a type
   25 | func ModDiv(a, b int64) int64 {
      | ^~~~
a.cc:29:1: error: 'func' does not name a type
   29 | func ModPow(a, n int64) int64 {
      | ^~~~
a.cc:41:1: error: 'func' does not name a type
   41 | func ModInv(a int64) int64 {
      | ^~~~
a.cc:57:1: error: 'type' does not name a type; did you mean 'typeof'?
   57 | type Q struct {
      | ^~~~
      | typeof
a.cc:63:1: error: 'type' does not name a type; did you mean 'typeof'?
   63 | type QS []*Q
      | ^~~~
      | typeof
a.cc:66:6: error: expected constructor, destructor, or type conversion before '(' token
   66 | func (p QS) Less(i, j int) bool { return p[i].value > p[j].value }
      |      ^
a.cc:67:6: error: expected constructor, destructor, or type conversion before '(' token
   67 | func (pq QS) Swap(i, j int) {
      |      ^
a.cc:73:6: error: expected constructor, destructor, or type conversion before '(' token
   73 | func (pq *QS) Push(x interface{}) {
      |      ^
a.cc:73:33: error: expected unqualified-id before ')' token
   73 | func (pq *QS) Push(x interface{}) {
      |                                 ^
a.cc:80:6: error: expected constructor, destructor, or type conversion before '(' token
   80 | func (pq *QS) Pop() interface{} {
      |      ^
a.cc:80:33: error: expected unqualified-id before '{' token
   80 | func (pq *QS) Pop() interface{} {
      |                                 ^
a.cc:90:1: error: 'func' does not name a type
   90 | func main() {
      | ^~~~