Language: C++

v#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll mod = 1000000007;
ll INF = 1e9 + 5;

void BFS(vector<ll> adj[],int u,vector<ll> &dp,int parent)
{
    dp[u] = max(dp[parent] + 1,dp[u]);
    for(auto v : adj[u])
    {
        BFS(adj,v,dp,u);
    }
}

int main(){
    FAST;
    ll n,m;
    cin >> n >> m;
    vector<ll> adj[n+1];
    for(int i=0;i<m;i++)
    {
        ll x,y;
        cin >> x >> y;
        adj[x].push_back(y);
    }
    vector<ll> dp(n+1,-1);
    for(int i=1;i<=n;i++)
    {
        BFS(adj,i,dp,0);
    }
    ll ans = 0;
    for(int i=1;i<=n;i++)
    {
        ans = max(ans,dp[i]);
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc:9:6: error: variable or field 'BFS' declared void
    9 | void BFS(vector<ll> adj[],int u,vector<ll> &dp,int parent)
      |      ^~~
a.cc:9:10: error: 'vector' was not declared in this scope
    9 | void BFS(vector<ll> adj[],int u,vector<ll> &dp,int parent)
      |          ^~~~~~
a.cc:4:12: error: expected primary-expression before 'long'
    4 | #define ll long long
      |            ^~~~
a.cc:9:17: note: in expansion of macro 'll'
    9 | void BFS(vector<ll> adj[],int u,vector<ll> &dp,int parent)
      |                 ^~
a.cc:9:27: error: expected primary-expression before 'int'
    9 | void BFS(vector<ll> adj[],int u,vector<ll> &dp,int parent)
      |                           ^~~
a.cc:9:33: error: 'vector' was not declared in this scope
    9 | void BFS(vector<ll> adj[],int u,vector<ll> &dp,int parent)
      |                                 ^~~~~~
a.cc:4:12: error: expected primary-expression before 'long'
    4 | #define ll long long
      |            ^~~~
a.cc:9:40: note: in expansion of macro 'll'
    9 | void BFS(vector<ll> adj[],int u,vector<ll> &dp,int parent)
      |                                        ^~
a.cc:9:48: error: expected primary-expression before 'int'
    9 | void BFS(vector<ll> adj[],int u,vector<ll> &dp,int parent)
      |                                                ^~~
a.cc: In function 'int main()':
a.cc:5:14: error: 'ios' has not been declared
    5 | #define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
      |              ^~~
a.cc:19:5: note: in expansion of macro 'FAST'
   19 |     FAST;
      |     ^~~~
a.cc:5:39: error: 'cin' was not declared in this scope
    5 | #define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
      |                                       ^~~
a.cc:19:5: note: in expansion of macro 'FAST'
   19 |     FAST;
      |     ^~~~
a.cc:5:51: error: 'cout' was not declared in this scope
    5 | #define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
      |                                                   ^~~~
a.cc:19:5: note: in expansion of macro 'FAST'
   19 |     FAST;
      |     ^~~~
a.cc:22:5: error: 'vector' was not declared in this scope
   22 |     vector<ll> adj[n+1];
      |     ^~~~~~
a.cc:4:12: error: expected primary-expression before 'long'
    4 | #define ll long long
      |            ^~~~
a.cc:22:12: note: in expansion of macro 'll'
   22 |     vector<ll> adj[n+1];
      |            ^~
a.cc:27:9: error: 'adj' was not declared in this scope
   27 |         adj[x].push_back(y);
      |         ^~~
a.cc:4:12: error: expected primary-expression before 'long'
    4 | #define ll long long
      |            ^~~~
a.cc:29:12: note: in expansion of macro 'll'
   29 |     vector<ll> dp(n+1,-1);
      |            ^~
a.cc:32:13: error: 'adj' was not declared in this scope
   32 |         BFS(adj,i,dp,0);
      |             ^~~
a.cc:32:19: error: 'dp' was not declared in this scope
   32 |         BFS(adj,i,dp,0);
      |                   ^~
a.cc:32:9: error: 'BFS' was not declared in this scope
   32 |         BFS(adj,i,dp,0);
      |         ^~~
a.cc:37:23: error: 'dp' was not declared in this scope
   37 |         ans = max(ans,dp[i]);
      |                       ^~
a.cc:37:15: error: 'max' was not declared in this scope
   37 |         ans = max(ans,dp[i]);
      |               ^~~
a.cc:39:20: error: 'endl' was not declared in this scope
   39 |     cout << ans << endl;
      |                    ^~~~