Language: C++

#include <iostream>
#include <climits>
#include <vector>
#include <queue>
using namespace std;

void get_map();
void check();
struct edge
{
  int to;
  int weight;
};


const int INF = INT_MAX/4;
#defien  MAX_V  1024;
vector<edge> g[2000];
int graph[MAX_V][MAX_V];
int dist[MAX_V];
int numofedge;
int vertex;
int start;
int flag=0;

int main()
{
  get_map();
  check();
  //for(int i=0;i<vertex;i++)
    {
      for(int j=0;j<vertex;j++)
	{
	  //if(i==j)
	    {
	      if(graph[start][j]<INF/2 && graph[j][j]<0)
		{
		  cout << "NEGATIVE CYCLE" <<endl;
		  return 0;
		}
	    }
	}
    }
  
    for(int i=0;i<vertex;i++)
      {
	if(graph[start][i]>=INF/2)
	  {
	    cout << "INF" << endl;
	  }
	else
	  {
	cout << graph[start][i] << endl;
	  }
      }
  return 0;
}

inline int fastmin(int a, int b)
{
  return (((a-b)>>31)&(a-b))+b;
}

void check()
{
  //  int next;
  //int here = start;
  //for(int i=0;i<vertex;i++)
  
  for(int k=0;k<vertex;k++)//v=4
    {
      for(int i=0;i<vertex;i++)
	{
	  for(int j=0;j<vertex;j++)
	    {
	      //if(graph[i][k] !=INF && graph[k][j]!=INF)
		{
	      graph[i][j]= fastmin(graph[i][j], graph[i][k]+graph[k][j]);
		}
	    }
	}
    }
  
}

void get_map()
{
  int edge, from ,to;
  cin >> vertex >> numofedge >> start;
  
  fill(graph[0], graph[vertex], INF);
  
  for(int i=0;i<vertex;i++)
    {
      for(int j=0;j<vertex;j++)
      {
	if(i==j)
	  {
	    graph[i][j]=0;
	  }
	/*else
	  {
	    graph[i][j]=INF;
	    }*/
      }
    }

  /*for(int i=0;i<vertex;i++)
    {
      dist[i]=INF;
    }
  */
  for(int i=0;i<numofedge;i++)
    {
      cin>>from>>to;
      cin >> graph[from][to];
    }

  /*  for(int i=0;i<numofedge;i++)
    {
      int from, to, weight; 
      cin >> from >> to >> weight;
      g[from].push_back({to , weight});
   }
  */  

  /*  for(int i=0;i<vertex;i++)
    {
      for(int j=0;j<vertex;j++)
	{
	  cout << graph[i][j] << " ";
	}
      cout << endl;
      }*/
  // dist[start]=0;
  
  /*  cout << vertex << endl;
  for(int i=0;i<vertex;i++)
    {
      for(int j=0;j<vertex;j++)
	{
	  cout << graph[i][j] << " ";
	}  
      cout << endl;    
      }*/
  

}

Compiler output:
a.cc:17:2: error: invalid preprocessing directive #defien; did you mean #define?
   17 | #defien  MAX_V  1024;
      |  ^~~~~~
      |  define
a.cc:19:11: error: 'MAX_V' was not declared in this scope
   19 | int graph[MAX_V][MAX_V];
      |           ^~~~~
a.cc:19:18: error: 'MAX_V' was not declared in this scope
   19 | int graph[MAX_V][MAX_V];
      |                  ^~~~~
a.cc:20:10: error: 'MAX_V' was not declared in this scope
   20 | int dist[MAX_V];
      |          ^~~~~
a.cc: In function 'int main()':
a.cc:36:18: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   36 |               if(graph[start][j]<INF/2 && graph[j][j]<0)
      |                  ^~~~~
      |                  isgraph
a.cc:47:12: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   47 |         if(graph[start][i]>=INF/2)
      |            ^~~~~
      |            isgraph
a.cc: In function 'void check()':
a.cc:78:15: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   78 |               graph[i][j]= fastmin(graph[i][j], graph[i][k]+graph[k][j]);
      |               ^~~~~
      |               isgraph
a.cc: In function 'void get_map()':
a.cc:91:8: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   91 |   fill(graph[0], graph[vertex], INF);
      |        ^~~~~
      |        isgraph