Language: C++

#define int long long
using namespace std;
const int MOD = 1000000007;
const int INF = 1e15;
using Graph = vector<vector<int>>;

signed main(){
  int N, M;
  cin >> N >> M;

  vector<vector<int>> G(N, vector<int>(N, INF));
  vector<pair<int, int>> E(M);
  for( int i = 0; i < N; i++ ) G.at(i).at(i) = 0;
  for( int i = 0; i < M; i++ ){
    int A, B, C;
    cin >> A >> B >> C;
    A--; B--;
    G.at(A).at(B) = C;
    G.at(B).at(A) = C;
    E.at(i) = {A, B};
  }

  vector<bool> fg(M, true);
  for (int k = 0; k < N; k++){       // 経由する頂点
    for (int i = 0; i < N; i++) {    // 始点
      for (int j = 0; j < N; j++) {  // 終点
        if( G[i][j] > G[i][k] + G[k][j] ){
          for( int p = 0; p < M; p++ ){
            pair<int, int> p1 = {k, j};
            pair<int, int> p2 = {j, k};
            if( E.at(p) == p1 || E.at(p) == p2 ) fg.at(p) = false;
            p1 = {i, k};
            p2 = {k, i};
            if( E.at(p) == p1 || E.at(p) == p2 ) fg.at(p) = false;
          }
        }
        G[i][j] = min(G[i][j], G[i][k] + G[k][j]);
      }
    }
  }

  int ans = 0;
  for( int i = 0; i < M; i++ ){
    if( fg.at(i) ) ans++;
  }
  cout << ans << endl;

 }
}

Compiler output:
a.cc:5:15: error: 'vector' does not name a type
    5 | using Graph = vector<vector<int>>;
      |               ^~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> N >> M;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define int long long
a.cc:11:3: error: 'vector' was not declared in this scope
   11 |   vector<vector<int>> G(N, vector<int>(N, INF));
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #define int long long
a.cc:1:13: error: expected primary-expression before 'long'
    1 | #define int long long
      |             ^~~~
a.cc:11:17: note: in expansion of macro 'int'
   11 |   vector<vector<int>> G(N, vector<int>(N, INF));
      |                 ^~~
a.cc:12:10: error: 'pair' was not declared in this scope
   12 |   vector<pair<int, int>> E(M);
      |          ^~~~
a.cc:1:1: note: 'std::pair' is defined in header '<utility>'; this is probably fixable by adding '#include <utility>'
  +++ |+#include <utility>
    1 | #define int long long
a.cc:1:13: error: expected primary-expression before 'long'
    1 | #define int long long
      |             ^~~~
a.cc:12:15: note: in expansion of macro 'int'
   12 |   vector<pair<int, int>> E(M);
      |               ^~~
a.cc:13:32: error: 'G' was not declared in this scope
   13 |   for( int i = 0; i < N; i++ ) G.at(i).at(i) = 0;
      |                                ^
a.cc:18:5: error: 'G' was not declared in this scope
   18 |     G.at(A).at(B) = C;
      |     ^
a.cc:20:5: error: 'E' was not declared in this scope
   20 |     E.at(i) = {A, B};
      |     ^
a.cc:23:10: error: expected primary-expression before 'bool'
   23 |   vector<bool> fg(M, true);
      |          ^~~~
a.cc:27:13: error: 'G' was not declared in this scope
   27 |         if( G[i][j] > G[i][k] + G[k][j] ){
      |             ^
a.cc:1:13: error: expected primary-expression before 'long'
    1 | #define int long long
      |             ^~~~
a.cc:29:18: note: in expansion of macro 'int'
   29 |             pair<int, int> p1 = {k, j};
      |                  ^~~
a.cc:1:13: error: expected primary-expression before 'long'
    1 | #define int long long
      |             ^~~~
a.cc:30:18: note: in expansion of macro 'int'
   30 |             pair<int, int> p2 = {j, k};
      |                  ^~~
a.cc:31:17: error: 'E' was not declared in this scope
   31 |             if( E.at(p) == p1 || E.at(p) == p2 ) fg.at(p) = false;
      |                 ^
a.cc:31:28: error: 'p1' was not declared in this scope; did you mean 'p'?
   31 |             if( E.at(p) == p1 || E.at(p) == p2 ) fg.at(p) = false;
      |                            ^~
      |                            p
a.cc:31:45: error: 'p2' was not declared in this scope; did you mean 'p'?
   31 |             if( E.at(p) == p1 || E.at(p) == p2 ) fg.at(p) = false;
      |                                             ^~
      |                                             p
a.cc:31:50: error: 'fg' was not declared in this scope
   31 |             if( E.at(p) == p1 || E.at(p) == p2 ) fg.at(p) = false;
      |                                                  ^~
a.cc:32:13: error: 'p1' was not declared in this scope; did you mean 'p'?
   32 |             p1 = {i, k};
      |             ^~
      |             p
a.cc:33:13: error: 'p2' was not declared in this scope; did you mean 'p'?
   33 |             p2 = {k, i};
      |             ^~
      |             p
a.cc:34:17: error: 'E' was not declared in this scope
   34 |             if( E.at(p) == p1 || E.at(p) == p2 ) fg.at(p) = false;
      |                 ^
a.cc:34:50: error: 'fg' was not declared in this scope
   34 |             if( E.at(p) == p1 || E.at(p) == p2 ) fg.at(p) = false;
      |                                                  ^~
a.cc:37:9: error: 'G' was not declared in this scope
   37 |         G[i][j] = min(G[i][j], G[i][k] + G[k][j]);
      |         ^
a.cc:37:19: error: 'min' was not declared in this scope; did you mean 'main'?
   37 |         G[i][j] = min(G[i][j], G[i][k] + G[k][j]);
      |                   ^~~
      |                   main
a.cc:44:9: error: 'fg' was not declared in this scope
   44 |     if( fg.at(i) ) ans++;
      |         ^~
a.cc:46:3: error: 'cout' was not declared in this scope
   46 |   cout << ans << endl;
      |   ^~~~
a.cc:46:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:46:18: error: 'endl' was not declared in this scope
   46 |   cout << ans << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define int long long
a.cc: At global scope:
a.cc:49:1: error: expected declaration before '}' token
   49 | }
      | ^