Language: C++

    vector<vector<long long>> map;
    map.resize(100002);
    for(int i=0;i<map.size();i++){
        map[i].resize(100002);
    }

    for(int i=0;i<map.size();i++){
        for(int j=0;j<map[i].size();j++){
            map[i][j]=0;
        }
    }



    int N;scanf("%d",&N);
    int M;scanf("%d",&M);
    vector<int> L;
    vector<int> R;
    vector<int> D;

    for(int i=0;i<M;i++){
        int l,r,d;
        scanf("%d %d %d",&l,&r,&d);
        map[r][l]=d;
    }

    bool isOk=true;
    int tmp=0;
    for(int i=1;i<=N;i++){
        for(int j=1;j<=N;j++){
            if(map[i][j]==0){
                continue;
            }else {
                int max=map[i][j];
                for(int k=1;k<=N;k++){
                    tmp=map[k][j]+map[i][k];
                    if(max<tmp){
                        isOk=false;
                    }
                }
            }
        }
    }

    if(isOk){
        printf("Yes");
    }else{
        printf("No");
    }

Compiler output:
a.cc:1:5: error: 'vector' does not name a type
    1 |     vector<vector<long long>> map;
      |     ^~~~~~
a.cc:2:5: error: 'map' does not name a type
    2 |     map.resize(100002);
      |     ^~~
a.cc:3:5: error: expected unqualified-id before 'for'
    3 |     for(int i=0;i<map.size();i++){
      |     ^~~
a.cc:3:17: error: 'i' does not name a type
    3 |     for(int i=0;i<map.size();i++){
      |                 ^
a.cc:3:30: error: 'i' does not name a type
    3 |     for(int i=0;i<map.size();i++){
      |                              ^
a.cc:7:5: error: expected unqualified-id before 'for'
    7 |     for(int i=0;i<map.size();i++){
      |     ^~~
a.cc:7:17: error: 'i' does not name a type
    7 |     for(int i=0;i<map.size();i++){
      |                 ^
a.cc:7:30: error: 'i' does not name a type
    7 |     for(int i=0;i<map.size();i++){
      |                              ^
a.cc:15:16: error: expected constructor, destructor, or type conversion before '(' token
   15 |     int N;scanf("%d",&N);
      |                ^
a.cc:16:16: error: expected constructor, destructor, or type conversion before '(' token
   16 |     int M;scanf("%d",&M);
      |                ^
a.cc:17:5: error: 'vector' does not name a type
   17 |     vector<int> L;
      |     ^~~~~~
a.cc:18:5: error: 'vector' does not name a type
   18 |     vector<int> R;
      |     ^~~~~~
a.cc:19:5: error: 'vector' does not name a type
   19 |     vector<int> D;
      |     ^~~~~~
a.cc:21:5: error: expected unqualified-id before 'for'
   21 |     for(int i=0;i<M;i++){
      |     ^~~
a.cc:21:17: error: 'i' does not name a type
   21 |     for(int i=0;i<M;i++){
      |                 ^
a.cc:21:21: error: 'i' does not name a type
   21 |     for(int i=0;i<M;i++){
      |                     ^
a.cc:29:5: error: expected unqualified-id before 'for'
   29 |     for(int i=1;i<=N;i++){
      |     ^~~
a.cc:29:17: error: 'i' does not name a type
   29 |     for(int i=1;i<=N;i++){
      |                 ^
a.cc:29:22: error: 'i' does not name a type
   29 |     for(int i=1;i<=N;i++){
      |                      ^
a.cc:45:5: error: expected unqualified-id before 'if'
   45 |     if(isOk){
      |     ^~
a.cc:47:6: error: expected unqualified-id before 'else'
   47 |     }else{
      |      ^~~~