For problem statement at 1000-1999/1100-1199/1140-1149/1146/problemE.txt this is a correct solution, but verifier at 1000-1999/1100-1199/1140-1149/1146/verifierE.go ends with All tests passed can you fix the verifier? ```go
package main
import (
"bufio"
"io"
"os"
"strconv"
)
const (
NEG uint8 = 0
TOG uint8 = 1
ID uint8 = 2
POS uint8 = 3
)
var data []byte
var idx int
var lazy []uint8
var maxAbs int
func nextInt() int {
for idx < len(data) {
c := data[idx]
if c != ' ' && c != '\n' && c != '\r' && c != '\t' {
break
}
idx++
}
sign := 1
if data[idx] == '-' {
sign = -1
idx++
}
val := 0
for idx < len(data) {
c := data[idx]
if c < '0' || c > '9' {
break
}
val = val*10 + int(c-'0')
idx++
}
return sign * val
}
func nextByte() byte {
for idx < len(data) {
c := data[idx]
if c != ' ' && c != '\n' && c != '\r' && c != '\t' {
idx++
return c
}
idx++
}
return 0
}
func abs(x int) int {
if x < 0 {
return -x
}
return x
}
func compose(f, g uint8) uint8 {
g0 := g & 1
g1 := (g >> 1) & 1
out0 := (f >> g0) & 1
out1 := (f >> g1) & 1
return out0 | (out1 << 1)
}
func push(node int) {
if lazy[node] == ID {
return
}
op := lazy[node]
left := node << 1
right := left | 1
lazy[left] = compose(op, lazy[left])
lazy[right] = compose(op, lazy[right])
lazy[node] = ID
}
func update(node, l, r, ql, qr int, op uint8) {
if ql > r || qr < l || ql > qr {
return
}
if ql <= l && r <= qr {
lazy[node] = compose(op, lazy[node])
return
}
push(node)
mid := (l + r) >> 1
if ql <= mid {
update(node<<1, l, mid, ql, qr, op)
}
if qr > mid {
update(node<<1|1, mid+1, r, ql, qr, op)
}
}
func rangeUpdate(l, r int, op uint8) {
if l < 0 {
l = 0
}
if r > maxAbs {
r = maxAbs
}
if l <= r {
update(1, 0, maxAbs, l, r, op)
}
}
func collect(node, l, r int, trans []uint8) {
if l == r {
trans[l] = lazy[node]
return
}
push(node)
mid := (l + r) >> 1
collect(node<<1, l, mid, trans)
collect(node<<1|1, mid+1, r, trans)
}
func main() {
data, _ = io.ReadAll(os.Stdin)
n := nextInt()
q := nextInt()
a := make([]int, n)
for i := 0; i < n; i++ {
a[i] = nextInt()
if v := abs(a[i]); v > maxAbs {
maxAbs = v
}
}
lazy = make([]uint8, 4*(maxAbs+1)+5)
for i := range lazy {
lazy[i] = ID
}
for i := 0; i < q; i++ {
s := nextByte()
x := nextInt()
if s == '>' {
if x >= 0 {
rangeUpdate(x+1, maxAbs, NEG)
} else {
t := -x
rangeUpdate(0, t-1, TOG)
rangeUpdate(t, maxAbs, NEG)
}
} else {
if x <= 0 {
t := -x
rangeUpdate(t+1, maxAbs, POS)
} else {
rangeUpdate(0, x-1, TOG)
rangeUpdate(x, maxAbs, POS)
}
}
}
trans := make([]uint8, maxAbs+1)
collect(1, 0, maxAbs, trans)
out := make([]byte, 0, n*8)
for i, v := range a {
if i > 0 {
out = append(out, ' ')
}
m := abs(v)
res := 0
if m != 0 {
t := trans[m]
sign := 0
if v < 0 {
sign = int(t & 1)
} else {
sign = int((t >> 1) & 1)
}
if sign == 1 {
res = m
} else {
res = -m
}
}
out = strconv.AppendInt(out, int64(res), 10)
}
out = append(out, '\n')
w := bufio.NewWriterSize(os.Stdout, 1<<20)
w.Write(out)
w.Flush()
}
```