Language: C++

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
#define rep(begin, i, end) for (int i = begin; i < (int)(end); i++)
#define all(v) v.begin(), v.end()
const int MOD = 1000000007;

int main()
{
    ll N, K;
    cin >> N >> K;
    vector<ll> A(N);
    rep(0, i, N)
    {
        cin >> A.at(i);
    }

    rep(0, i, K)
    {
        if (i > 50)
        {
            break;
        }
        vector<ll> B(N, 0);
        rep(0, j, N)
        {
            ll l = max((ll)0, j - A.at(j));
            ll r = min(N - 1, j + A.at(j));
            B.at(l)++;
            if (r + 1 < N)
            {
                B.at(r + 1)--;
            }
        }
        rep(1, i, N)
        {
            B.at(i) += B.at(i - 1);
            if (B.at(i) >= N)
            {
                B.at(i) = N;
            }
            A.at(i) = B.at(i);
        }
        A.at(0) = B.at(0);
    }

    rep(0, i, N)
    {
        cout << A.at(i) << ' ';
    }
    cout << endl;
}#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
#define rep(begin, i, end) for (int i = begin; i < (int)(end); i++)
#define all(v) v.begin(), v.end()
const int MOD = 1000000007;

int main()
{
    ll N, K;
    cin >> N >> K;
    vector<ll> A(N);
    rep(0, i, N)
    {
        cin >> A.at(i);
    }

    rep(0, i, K)
    {
        if (i > 50)
        {
            break;
        }
        vector<ll> B(N, 0);
        rep(0, j, N)
        {
            ll l = max((ll)0, j - A.at(j));
            ll r = min(N - 1, j + A.at(j));
            B.at(l)++;
            if (r + 1 < N)
            {
                B.at(r + 1)--;
            }
        }
        rep(1, i, N)
        {
            B.at(i) += B.at(i - 1);
            if (B.at(i) >= N)
            {
                B.at(i) = N;
            }
            A.at(i) = B.at(i);
        }
        A.at(0) = B.at(0);
    }

    rep(0, i, N)
    {
        cout << A.at(i) << ' ';
    }
    cout << endl;
}

Compiler output:
a.cc:74:2: error: stray '#' in program
   74 | }#include "iostream"
      |  ^
a.cc:74:3: error: 'include' does not name a type
   74 | }#include "iostream"
      |   ^~~~~~~
a.cc:101:11: error: redefinition of 'const int MOD'
  101 | const int MOD = 1000000007;
      |           ^~~
a.cc:28:11: note: 'const int MOD' previously defined here
   28 | const int MOD = 1000000007;
      |           ^~~
a.cc:103:5: error: redefinition of 'int main()'
  103 | int main()
      |     ^~~~
a.cc:30:5: note: 'int main()' previously defined here
   30 | int main()
      |     ^~~~