Language: C++

#include <bits/stdc++.h>

using namespace std;
//typedef long long ll;
//typedef vector<int> VI;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)

//グラフの隣接リスト
//VI g[100010];
vector<int> G[100010];
//頂点の入次数を管理
//int h[100010];
int indeg[100010];

signed main()
{
    //頂点数v、辺の数e
    int n, m;
    cin >> n >> m;
    REP(i, n+m-1) {
        int s, t;
        cin >> s >> t;
        s--;t--;
        //頂点sから頂点tへの有向辺
        G[s].push_back(t);
        indeg[t]++;
    }
    
    //入次数が0の頂点の集合を格納するスタック
    stack<int> st;
    
    //入次数が0の頂点であればstに追加
    REP(i, v) if(indeg[i] == 0) st.push(i);
    
    //ソートされた後のグラフの頂点の列
    vector<int> seq;
    //stがなくなるまでループ
    while(st.size()) {
        //stの集合のから一つ取り出す
        int i = st.top(); st.pop();
        seq.push_back(i);
        for(auto& j: G[i]) {
            //隣接する頂点の入次数をマイナス1
            indeg[j]--;
            //これによって入次数が0になればstに追加
            if(indeg[j] == 0) st.push(j);
        }
    }
    
    vector<int> ans(n);
    REP(i,n){
      if(i==0){
        ans[seq[i]] = 0;
      }else{
        ans[seq[i]] = seq[i-1]+1;
      }
    }
    REP(i,n){
      cout<<ans[i];
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: 'll' was not declared in this scope
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                           ^~
a.cc:8:19: note: in expansion of macro 'FOR'
    8 | #define REP(i, n) FOR(i, 0, n)
      |                   ^~~
a.cc:22:5: note: in expansion of macro 'REP'
   22 |     REP(i, n+m-1) {
      |     ^~~
a.cc:22:9: error: 'i' was not declared in this scope
   22 |     REP(i, n+m-1) {
      |         ^
a.cc:7:41: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                                         ^
a.cc:22:5: note: in expansion of macro 'REP'
   22 |     REP(i, n+m-1) {
      |     ^~~
a.cc:22:12: error: expected ';' before 'n'
   22 |     REP(i, n+m-1) {
      |            ^
a.cc:7:49: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                                                 ^
a.cc:22:5: note: in expansion of macro 'REP'
   22 |     REP(i, n+m-1) {
      |     ^~~
a.cc:7:50: error: expected ')' before ';' token
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                          ~                       ^
a.cc:8:19: note: in expansion of macro 'FOR'
    8 | #define REP(i, n) FOR(i, 0, n)
      |                   ^~~
a.cc:22:5: note: in expansion of macro 'REP'
   22 |     REP(i, n+m-1) {
      |     ^~~
a.cc:22:9: error: 'i' was not declared in this scope
   22 |     REP(i, n+m-1) {
      |         ^
a.cc:7:54: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                                                      ^
a.cc:22:5: note: in expansion of macro 'REP'
   22 |     REP(i, n+m-1) {
      |     ^~~
a.cc:7:27: error: 'll' was not declared in this scope
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                           ^~
a.cc:8:19: note: in expansion of macro 'FOR'
    8 | #define REP(i, n) FOR(i, 0, n)
      |                   ^~~
a.cc:35:5: note: in expansion of macro 'REP'
   35 |     REP(i, v) if(indeg[i] == 0) st.push(i);
      |     ^~~
a.cc:35:12: error: expected ';' before 'v'
   35 |     REP(i, v) if(indeg[i] == 0) st.push(i);
      |            ^
a.cc:7:49: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                                                 ^
a.cc:35:5: note: in expansion of macro 'REP'
   35 |     REP(i, v) if(indeg[i] == 0) st.push(i);
      |     ^~~
a.cc:35:12: error: 'v' was not declared in this scope
   35 |     REP(i, v) if(indeg[i] == 0) st.push(i);
      |            ^
a.cc:7:49: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                                                 ^
a.cc:35:5: note: in expansion of macro 'REP'
   35 |     REP(i, v) if(indeg[i] == 0) st.push(i);
      |     ^~~
a.cc:7:50: error: expected ')' before ';' token
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                          ~                       ^
a.cc:8:19: note: in expansion of macro 'FOR'
    8 | #define REP(i, n) FOR(i, 0, n)
      |                   ^~~
a.cc:35:5: note: in expansion of macro 'REP'
   35 |     REP(i, v) if(indeg[i] == 0) st.push(i);
      |     ^~~
a.cc:7:27: error: 'll' was not declared in this scope
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                           ^~
a.cc:8:19: note: in expansion of macro 'FOR'
    8 | #define REP(i, n) FOR(i, 0, n)
      |                   ^~~
a.cc:53:5: note: in expansion of macro 'REP'
   53 |     REP(i,n){
      |     ^~~
a.cc:53:11: error: expected ';' before 'n'
   53 |     REP(i,n){
      |           ^
a.cc:7:49: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                                                 ^
a.cc:53:5: note: in expansion of macro 'REP'
   53 |     REP(i,n){
      |     ^~~
a.cc:7:50: error: expected ')' before ';' token
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                          ~                       ^
a.cc:8:19: note: in expansion of macro 'FOR'
    8 | #define REP(i, n) FOR(i, 0, n)
      |                   ^~~
a.cc:53:5: note: in expansion of macro 'REP'
   53 |     REP(i,n){
      |     ^~~
a.cc:7:27: error: 'll' was not declared in this scope
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                           ^~
a.cc:8:19: note: in expansion of macro 'FOR'
    8 | #define REP(i, n) FOR(i, 0, n)
      |                   ^~~
a.cc:60:5: note: in expansion of macro 'REP'
   60 |     REP(i,n){
      |     ^~~
a.cc:60:11: error: expected ';' before 'n'
   60 |     REP(i,n){
      |           ^
a.cc:7:49: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                                                 ^
a.cc:60:5: note: in expansion of macro 'REP'
   60 |     REP(i,n){
      |     ^~~
a.cc:7:50: error: expected ')' before ';' token
    7 | #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
      |                          ~                       ^
a.cc:8:19: note: in expansion of macro 'FOR'
    8 | #define REP(i, n) FOR(i, 0, n)
      |                   ^~~
a.cc:60:5: note: in expansion of macro 'REP'
   60 |     REP(i,n){
      |     ^~~