package main

import (
  "bufio"
  "fmt"
  "os"
  "strconv"
  "strings"
)
const INF = 1<<31-1

func main() {
  input := Input{bufio.NewReaderSize(os.Stdin,10000)}
  n,q := input.Next2Ints()
  a := input.NextIntArray()
  b := input.NextIntArray()
  tot := int64(a[0]+a[2*n-1])
  ma := NewMultiSet()
  mb := NewMultiSet()
  for i:=1;i<2*n-1;i++ {
    if a[i] >= b[i] {
      tot += int64(a[i])
      ma.Add(a[i]-b[i])
    } else {
      tot += int64(b[i])
      mb.Add(b[i]-a[i])
    }
  }
  for i:=0;i<q;i++ {
    p,x,y := input.Next3Ints()
    p--
    if p == 0 || p == 2*n-1 {
      tot -= int64(a[p])
      a[p] = x
      tot += int64(a[p])
    } else {
      if a[p] >= b[p] {
        tot -= int64(a[p])
        ma.Remove(a[p]-b[p])
      } else {
        tot -= int64(b[p])
        mb.Remove(b[p]-a[p])
      }
      a[p] = x
      b[p] = y
      if a[p] >= b[p] {
        tot += int64(a[p])
        ma.Add(a[p]-b[p])
      } else {
        tot += int64(b[p])
        mb.Add(b[p]-a[p])
      }
    }
    ex := 0
    if ma.size%2 == 1 { ex = min(ma.PeekFirst(),mb.PeekFirst()) }
    fmt.Println(tot-int64(ex))
  }
}
func min(n,m int) int {
  if n < m { return n }
  return m
}

type Entry struct { key,val int }
func NewEntry(key,val int) *Entry { return &Entry{key,val} }
func(e *Entry) CompareTo(o *Entry) int { return e.key-o.key }
type Node struct {
  left,right *Node
  level int
  entry *Entry
}
func NewNode(entry *Entry) *Node { return &Node{nil,nil,1,entry} }
func(n *Node) IsLeaf() bool {
  return n != nil && n.left == nil && n.right == nil
}
func(n *Node) Size() int {
  if n == nil { return 0 }
  return n.left.Size()+n.right.Size()+1
}
func(n *Node) Output() {
  if n == nil { return }
  n.left.Output()
  fmt.Print(n.entry," ")
  n.right.Output()
}
func(n *Node) Skew() *Node {
  if n == nil || n.left == nil || n.left.level != n.level { return n }
  l := n.left
  n.left = l.right
  l.right = n
  return l
}
func(n *Node) Split() *Node {
  if n == nil || n.right == nil || n.right.right == nil ||
  n.right.right.level != n.level { return n }
  r := n.right
  n.right = r.left
  r.left = n
  r.level++
  return r
}
func(n *Node) Insert(entry *Entry) *Node {
  if n == nil { return NewNode(entry) }
  if entry.CompareTo(n.entry) < 0 {
    n.left = n.left.Insert(entry)
  } else if entry.CompareTo(n.entry) > 0 {
    n.right = n.right.Insert(entry)
  } else {
    n.entry = entry
  }
  n = n.Skew()
  n = n.Split()
  return n
}
func(n *Node) Delete(entry *Entry) *Node {
  if n == nil { return n }
  if entry.CompareTo(n.entry) < 0 {
    n.left = n.left.Delete(entry)
  } else if entry.CompareTo(n.entry) > 0 {
    n.right = n.right.Delete(entry)
  } else {
    if n.IsLeaf() {
      return nil
    } else if n.left == nil {
      tmp := n.right
      for tmp.left != nil { tmp = tmp.left }
      n.right = n.right.Delete(tmp.entry)
      n.entry = tmp.entry
    } else {
      tmp := n.left
      for tmp.right != nil { tmp = tmp.right }
      n.left = n.left.Delete(tmp.entry)
      n.entry = tmp.entry
    }
  }
  n = n.DecreaseLevel()
  n = n.Skew()
  n.right = n.right.Skew()
  if n.right != nil { n.right.right = n.right.right.Skew() }
  n = n.Split()
  n.right = n.right.Split()
  return n
}
func(n *Node) DecreaseLevel() *Node {
  level := 0
  if n.left != nil { level = n.left.level }
  if n.right != nil && level > n.right.level { level = n.right.level }
  level++
  if n.level > level {
    n.level = level
    if n.right != nil && n.right.level > level { n.right.level = level }
  }
  return n
}
type TreeMap struct { root *Node }
func NewTreeMap() *TreeMap { return &TreeMap{nil} }
func(m *TreeMap) Size() int { return m.root.Size() }
func(m *TreeMap) PutEntry(entry *Entry) { m.root = m.root.Insert(entry) }
func(m *TreeMap) RemoveEntry(entry *Entry) { m.root = m.root.Delete(entry) }
func(m *TreeMap) GetEntry(entry *Entry) *Entry {
  n := m.root
  for n != nil {
    if entry.CompareTo(n.entry) < 0 {
      n = n.left
    } else if entry.CompareTo(n.entry) > 0 {
      n = n.right
    } else {
      return n.entry
    }
  }
  return nil
}
func(m *TreeMap) ContainsEntry(entry *Entry) bool {
  n := m.root
  for n != nil {
    if entry.CompareTo(n.entry) < 0 {
      n = n.left
    } else if entry.CompareTo(n.entry) > 0 {
      n = n.right
    } else {
      return true
    }
  }
  return false
}
func(m *TreeMap) FirstEntry() *Entry {
  n := m.root
  if n == nil { return nil }
  for n.left != nil { n = n.left }
  return n.entry
}
func(m *TreeMap) LastEntry() *Entry {
  n := m.root
  if n == nil { return nil }
  for n.right != nil { n = n.right }
  return n.entry
}
func(m *TreeMap) PollFirstEntry() *Entry {
  entry := m.FirstEntry()
  m.root.Delete(entry)
  return entry
}
func(m *TreeMap) PollLastEntry() *Entry {
  entry := m.LastEntry()
  m.root.Delete(entry)
  return entry
}
func(m *TreeMap) Put(key,val int) { m.PutEntry(NewEntry(key,val)) }
func(m *TreeMap) Remove(key int) { m.RemoveEntry(NewEntry(key,0)) }
func(m *TreeMap) Get(key int) int { return m.GetEntry(NewEntry(key,0)).val }
func(m *TreeMap) Contains(key int) bool { return m.ContainsEntry(NewEntry(key,0)) }
func(m *TreeMap) First() (int,int) { e := m.FirstEntry();return e.key,e.val }
func(m *TreeMap) Last() (int,int) { e := m.LastEntry();return e.key,e.val }
func(m *TreeMap) PollFirst() (int,int) { e := m.PollFirstEntry();return e.key,e.val }
func(m *TreeMap) PollLast() (int,int) { e := m.PollLastEntry();return e.key,e.val }
type MultiSet struct {
  tm *TreeMap
  cnt map[int]int
  size int
}
func NewMultiSet() *MultiSet { return &MultiSet{NewTreeMap(),make(map[int]int),0} }
func(m *MultiSet) Add(e int) {
  m.size++
  if _,ok := m.cnt[e];!ok { m.tm.Put(e,0) }
  m.cnt[e]++
}
func(m *MultiSet) IsEmpty() bool { return m.size == 0 }
func(m *MultiSet) PollFirst() int {
  if m.IsEmpty() { return INF }
  m.size--
  first := m.tm.FirstEntry().key
  if m.cnt[first] == 1 {
    delete(m.cnt,first)
    return m.tm.PollFirstEntry().key
  } else {
    m.cnt[first]--
    return first
  }
}
func(m *MultiSet) PollLast() int {
  if m.IsEmpty() { return INF }
  m.size--
  last := m.tm.LastEntry().key
  if m.cnt[last] == 1 {
    delete(m.cnt,last)
    return m.tm.PollLastEntry().key
  } else {
    m.cnt[last]--
    return last
  }
}
func(m *MultiSet) Remove(e int) {
  if _,ok := m.cnt[e];!ok { return }
  m.size--
  if m.cnt[e] == 1 {
    delete(m.cnt,e)
    m.tm.Remove(e)
  } else {
    m.cnt[e]--
  }
}
func(m *MultiSet) PeekFirst() int {
  if m.IsEmpty() { return INF }
  return m.tm.FirstEntry().key
}
func(m *MultiSet) PeekLast() int {
  if m.IsEmpty() { return INF }
  return m.tm.LastEntry().key
}

type Input struct { reader *bufio.Reader }
func(i *Input) NextLine() string {
  var buffer []byte
  for {
    line,isPrefix,err := i.reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer,line...)
    if !isPrefix { break }
  }
  return string(buffer)
}
func(i *Input) Next2Ints() (int,int) {
  s := strings.Fields(i.NextLine())
  x,_ := strconv.Atoi(s[0])
  y,_ := strconv.Atoi(s[1])
  return x,y
}
func(i *Input) Next3Ints() (int,int,int) {
  s := strings.Fields(i.NextLine())
  x,_ := strconv.Atoi(s[0])
  y,_ := strconv.Atoi(s[1])
  z,_ := strconv.Atoi(s[2])
  return x,y,z
}
func(i *Input) NextIntArray() []int {
  s := strings.Fields(i.NextLine())
  a := make([]int,len(s))
  for i:=0;i<len(s);i++ { a[i],_ = strconv.Atoi(s[i]) }
  return a
}

Measured memory_bytes: 38016