Language: C++

#define _GLIBCXX_DEBUG
//#include <bits/stdc++.h>
#define FOR(i, a, b) for(int i = a; i<b; i++)
#define rep(i, n) FOR(i, 0, n)
#define rFOR(i, a, b) for(int i = a;i >= b; i--)
#define rrep(i, a) rFOR(i, a, 0)
#define pb push_back
using namespace std;
using ll = long long;
using ld = long double;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<char> vc;
typedef vector<vc> vvc;
const ll MOD = 1000000007;
const ll MOD2 = 998244353;
const ld PI = acos(-1);
const ll INF = 1e18;
struct edge{ll to, cost;};

template <typename T>
bool chmax(T &a, const T &b) {
    if (a < b) {
      a = b;
        return true;
    }
    return false;
}

template <typename T>
bool chmin(T &a, const T &b) {
    if (a > b) {
      a = b;
      return true;
    }
    return false;
}

class BIT{
    vl bit;
public:
    void BIT_init(ll n){
        bit.assign(n + 1, 0);
        return;
    }
    ll get_sum(int i){
        ll res = 0;
        while(i > 0){
            res += bit[i];
            i -= i&(-i);
        }
        return res;
    }
    void add(int i, ll x){
        while(i <= bit.size() - 1){
            bit[i] += x;
            i += i&(-i);
        }
    }
};

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int N,Q;
    cin >> N >> Q;
    BIT bit;
    bit.BIT_init(N);
    vl A(N);
    rep(i,N){
        cin >> A[i];
        bit.add(i+1,A[i]);
    }
    rep(i,Q){
        int t,l,r;
        cin >> t >> l >> r;
        if(t==0){
            bit.add(l+1,r);
        }
        else{
            cout << bit.get_sum(r)-bit.get_sum(l) << '\n';
        }
    }
}
/*
overflow checked?
corner case checked?
boundary checked?
not TLE in worst case checked?
*/

Compiler output:
a.cc:11:9: error: 'pair' does not name a type
   11 | typedef pair<ll,ll> P;
      |         ^~~~
a.cc:12:9: error: 'vector' does not name a type
   12 | typedef vector<ll> vl;
      |         ^~~~~~
a.cc:13:9: error: 'vector' does not name a type
   13 | typedef vector<vl> vvl;
      |         ^~~~~~
a.cc:14:9: error: 'vector' does not name a type
   14 | typedef vector<P> vP;
      |         ^~~~~~
a.cc:15:9: error: 'vector' does not name a type
   15 | typedef vector<char> vc;
      |         ^~~~~~
a.cc:16:9: error: 'vector' does not name a type
   16 | typedef vector<vc> vvc;
      |         ^~~~~~
a.cc:19:15: error: 'acos' was not declared in this scope
   19 | const ld PI = acos(-1);
      |               ^~~~
a.cc:42:5: error: 'vl' does not name a type; did you mean 'll'?
   42 |     vl bit;
      |     ^~
      |     ll
a.cc: In member function 'void BIT::BIT_init(ll)':
a.cc:45:9: error: 'bit' was not declared in this scope
   45 |         bit.assign(n + 1, 0);
      |         ^~~
a.cc: In member function 'll BIT::get_sum(int)':
a.cc:51:20: error: 'bit' was not declared in this scope
   51 |             res += bit[i];
      |                    ^~~
a.cc: In member function 'void BIT::add(int, ll)':
a.cc:57:20: error: 'bit' was not declared in this scope
   57 |         while(i <= bit.size() - 1){
      |                    ^~~
a.cc: In function 'int main()':
a.cc:65:5: error: 'ios' has not been declared
   65 |     ios::sync_with_stdio(false);
      |     ^~~
a.cc:66:5: error: 'cin' was not declared in this scope
   66 |     cin.tie(nullptr);
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define _GLIBCXX_DEBUG
a.cc:71:5: error: 'vl' was not declared in this scope; did you mean 'll'?
   71 |     vl A(N);
      |     ^~
      |     ll
a.cc:73:16: error: 'A' was not declared in this scope
   73 |         cin >> A[i];
      |                ^
a.cc:83:13: error: 'cout' was not declared in this scope
   83 |             cout << bit.get_sum(r)-bit.get_sum(l) << '\n';
      |             ^~~~
a.cc:83:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'