Language: C++

#include<iostream>
#include<vector>
typeder long long ll;
using namespace std;
int main(){
    ll k,x,t=0;
    cin>>k;
    vector<ll> a(k+2);
    vector<ll> b(k);
    for(int i=0;i<k+1;i++) cin>>a[i];
    for(int i=0;i<k;i++) cin>>b[i];
    for(int i=0;i<k;i++) {
        if(b[i]>=a[i]){
            t+=a[i];b[i]-=a[i];
            if(b[i]>=a[i+1]) {t+=a[i+1];a[i+1]=0;}
            else {t+=b[i];a[i+1]-=b[i];}    
        }
        else t+=b[i];
    }
    cout<<t;
}

Compiler output:
a.cc:3:1: error: 'typeder' does not name a type; did you mean 'typedef'?
    3 | typeder long long ll;
      | ^~~~~~~
      | typedef
a.cc: In function 'int main()':
a.cc:6:5: error: 'll' was not declared in this scope
    6 |     ll k,x,t=0;
      |     ^~
a.cc:7:10: error: 'k' was not declared in this scope
    7 |     cin>>k;
      |          ^
a.cc:8:14: error: template argument 2 is invalid
    8 |     vector<ll> a(k+2);
      |              ^
a.cc:9:14: error: template argument 2 is invalid
    9 |     vector<ll> b(k);
      |              ^
a.cc:10:34: error: invalid types 'int[int]' for array subscript
   10 |     for(int i=0;i<k+1;i++) cin>>a[i];
      |                                  ^
a.cc:11:32: error: invalid types 'int[int]' for array subscript
   11 |     for(int i=0;i<k;i++) cin>>b[i];
      |                                ^
a.cc:13:13: error: invalid types 'int[int]' for array subscript
   13 |         if(b[i]>=a[i]){
      |             ^
a.cc:13:19: error: invalid types 'int[int]' for array subscript
   13 |         if(b[i]>=a[i]){
      |                   ^
a.cc:14:13: error: 't' was not declared in this scope
   14 |             t+=a[i];b[i]-=a[i];
      |             ^
a.cc:14:17: error: invalid types 'int[int]' for array subscript
   14 |             t+=a[i];b[i]-=a[i];
      |                 ^
a.cc:14:22: error: invalid types 'int[int]' for array subscript
   14 |             t+=a[i];b[i]-=a[i];
      |                      ^
a.cc:14:28: error: invalid types 'int[int]' for array subscript
   14 |             t+=a[i];b[i]-=a[i];
      |                            ^
a.cc:15:17: error: invalid types 'int[int]' for array subscript
   15 |             if(b[i]>=a[i+1]) {t+=a[i+1];a[i+1]=0;}
      |                 ^
a.cc:15:23: error: invalid types 'int[int]' for array subscript
   15 |             if(b[i]>=a[i+1]) {t+=a[i+1];a[i+1]=0;}
      |                       ^
a.cc:15:35: error: invalid types 'int[int]' for array subscript
   15 |             if(b[i]>=a[i+1]) {t+=a[i+1];a[i+1]=0;}
      |                                   ^
a.cc:15:42: error: invalid types 'int[int]' for array subscript
   15 |             if(b[i]>=a[i+1]) {t+=a[i+1];a[i+1]=0;}
      |                                          ^
a.cc:16:23: error: invalid types 'int[int]' for array subscript
   16 |             else {t+=b[i];a[i+1]-=b[i];}
      |                       ^
a.cc:16:28: error: invalid types 'int[int]' for array subscript
   16 |             else {t+=b[i];a[i+1]-=b[i];}
      |                            ^
a.cc:16:36: error: invalid types 'int[int]' for array subscript
   16 |             else {t+=b[i];a[i+1]-=b[i];}
      |                                    ^
a.cc:18:14: error: 't' was not declared in this scope
   18 |         else t+=b[i];
      |              ^
a.cc:18:18: error: invalid types 'int[int]' for array subscript
   18 |         else t+=b[i];
      |                  ^
a.cc:20:11: error: 't' was not declared in this scope
   20 |     cout<<t;
      |           ^