Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
#include<queue>
#include<string>
#include<vector>
#include<tuple>
#include<stack>
#include<iomanip>
#include<map>
using namespace std;
//def lib
#define rep(i,n) for(int i=0;i<((int)n);i++)
#define drep(i,n) for(int i=((int)n)-1;i>-1;i--)
#define Rep(i,n0,n) for(int i=n0;i<((int)n);i++)
#define dRep(i,n0,n) for(int i=((int)n)-1;i>n0-1;i--)
#define Com(i,j,n) for(int i=0;i<n-1;i++)for(int j=i+1;j<((int)n);j++)
#define W(x) cout<<x<<endl;
#define print(x) cout<<x<<endl;
#define Debug(x) cout<<"#DEBUG "<<x<<endl;
#define INF (1<<29)
#define INF2 (long long)8*(long long)INF*(long long)INF
#define mod 1000000007
//def end
typedef long long ll;
// lib
int min(int x,int y){if(y<x)return y;else return x;}
int max(int x,int y){if(y>x)return y;else return x;}
int fact(int x){int i=1;rep(j,x){i*=(j+1);} return i;}
int mfact(int x){int i=1;rep(j,x){i*=(j+1);} return i%mod;}
int modulo(int x){return x%mod;}
long long fact(long long x){long long i=1;rep(j,x){i*=(j+1);} return i;}
long long mfact(long long x){long long i=1;rep(j,x){i*=(j+1);} return i%mod;}
long long modulo(long long x){return x%mod;}
int gcd(int x, int y){if(x%y==0)return y;else if(y%x==0)return x;else return gcd(x%y,y%x);}
ll gcd(ll x, ll y){if(x%y==0)return y;else if(y%x==0)return x;else return gcd(x%y,y%x);}
void say(bool x){if(x){cout<<"Yes"<<endl;}else {cout<<"No"<<endl;}return;}
//lib end
int dx[8] = { 1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = { 0, 1, 0, -1, 1, 1, -1, -1};
int main(void){
const int inf = 100000000;
int n,m; cin>>n>>m;
int a[1000],b[1000],c[1000],dist[100][100];
for(inti=0;i< cin >> a[i] >> a[i]--,b[i]--;
}
for(inti=0;i< for(int j = 0;
m; ++i){
b[i] >> c[i];
n; ++i){ j<n;++j){
} }
if(i==j)
    dist[i][j]=0;
else
    dist[i][j]=inf;
for(inti=0;i<m;++i){ dist[a[i]][b[i]]=min(dist[a[i]][b[i]],c[i]); dist[b[i]][a[i]]=min(dist[b[i]][a[i]],c[i]);
}
for(intk=0;k<n;++k){ for(int i = 0; i < n; ++i){
            for(int j = 0; j < n; ++j){
                dist[i][j]=min(dist[i][j],dist[i][k]+dist[k][j]);
} }
}
int ans=m; for(inti=0;i<m;++i){
        bool shortest=false;
        for(int j = 0; j < n; ++j) if(dist[j][a[i]]+c[i]==dist[j][b[i]]) shortest=true;
        if(shortest==true){
ans=ans-1; }
}
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:5: error: 'inti' was not declared in this scope; did you mean 'int'?
   45 | for(inti=0;i< cin >> a[i] >> a[i]--,b[i]--;
      |     ^~~~
      |     int
a.cc:45:12: error: 'i' was not declared in this scope
   45 | for(inti=0;i< cin >> a[i] >> a[i]--,b[i]--;
      |            ^
a.cc:46:1: error: expected primary-expression before '}' token
   46 | }
      | ^
a.cc:45:44: error: expected ')' before '}' token
   45 | for(inti=0;i< cin >> a[i] >> a[i]--,b[i]--;
      |    ~                                       ^
      |                                            )
   46 | }
      | ~                                           
a.cc:46:1: error: expected primary-expression before '}' token
   46 | }
      | ^
a.cc: At global scope:
a.cc:47:1: error: expected unqualified-id before 'for'
   47 | for(inti=0;i< for(int j = 0;
      | ^~~
a.cc:47:12: error: 'i' does not name a type
   47 | for(inti=0;i< for(int j = 0;
      |            ^
a.cc:48:1: error: 'm' does not name a type; did you mean 'tm'?
   48 | m; ++i){
      | ^
      | tm
a.cc:48:4: error: expected unqualified-id before '++' token
   48 | m; ++i){
      |    ^~