Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
using namespace std;
#define rep(i,n) for(ll i=0;i<(n);++i)
#define rrep(i,n) for(ll i=(n)-1;i>=0;--i)
#define rep1(i,n) for(ll i=1;i<=(n);++i)
#define rrep1(i,n) for(ll i=(n);i>=1;--i)
#define fr first
#define sc second
#define pb push_back
#define INF 0xfffffff
typedef long long ll;
typedef pair<ll,ll> P;
typedef double db;
struct edge{ll to,cap,rev; }; // ????????????????????????
??
vector<edge> G[100];
vector<edge> rG[100];
ll d[100];
ll a[100];
ll cnt=0;
void add_edge(ll from,ll to,ll cap){
????????G[from].pb((edge){to, cap, rG[to].size() });
????????rG[to].pb((edge){from, 0, G[from].size()-1} );
}
??
ll calc(ll t){
????????ll res = 0;
????????rep(i,rG[t].size()){
????????????????res+=rG[t][i].cap;
????????}
????????return res;
}
??
ll max_flow(ll V,ll E,ll s,ll t){
????????ll res=0;
????????memset( d, 0, sizeof(d) );
????????memset( a, 0, sizeof(a) );
????????d[s] = V;
????????a[s]=-1;
????????a[t]=-1;
????????rep(i,G[s].size()){
????????????????if(G[s][i].to!=t){
????????????????????????edge &e = G[s][i];
????????????????????????a[e.to] += e.cap;
????????????????????????rG[e.to][e.rev].cap = e.cap;
????????????????????????e.cap = 0;
????????????????}
????????????????else{
????????????????????????res+=G[s][i].cap;
????????????????}
????????}
??
????????for(;;){
????????????????ll v = -1;?? //1
????????????????rep(i,V){
????????????????????????if( a[i]>0 ){
????????????????????????????????v = i;
????????????????????????????????break;
????????????????????????}
????????????????}
????????????????if(v < 0) return res+calc(t);
????????????????ll J=0; //2
????????????????ll id;
????????????????rep(i,G[v].size()){
????????????????????????if( G[v][i].cap>0 && d[v] - d[G[v][i].to] == 1 ){
????????????????????????????????id = i;
????????????????????????????????J=1;
????????????????????????????????break;
????????????????????????}
????????????????}
????????????????if(!J) rep(i,rG[v].size()){
????????????????????????if( rG[v][i].cap>0 && d[v] - d[rG[v][i].to] == 1 ){
????????????????????????????????id = i;
????????????????????????????????J=2;
????????????????????????????????break;
????????????????????????}
????????????????}
??????????
????????????????if(J){?? //3
????????????????????????edge &e = (J==1?G[v][id]:rG[v][id]);
????????????????????????if(J==1){
????????????????????????????????ll f = min(a[v], e.cap );
????????????????????????????????a[v] -= f;
????????????????????????????????e.cap -= f;
????????????????????????????????rG[e.to][e.rev].cap += f;
????????????????????????????????if(a[e.to]>=0) a[e.to] += f;
????????????????????????}
????????????????????????else{
????????????????????????????????edge &efor = G[e.to][e.rev];
????????????????????????????????ll f = min(a[v], e.cap);
????????????????????????????????a[v] -= f;
????????????????????????????????e.cap -= f;
????????????????????????????????efor.cap += f;
????????????????????????????????if(a[e.to]>=0) a[e.to] += f;
????????????????????????}
????????????????}
??
????????????????else{?? //4
????????????????????????ll dmin=0xfffffff;
????????????????????????rep(i,G[v].size()){
????????????????????????????????if(G[v][i].cap>0) dmin = min(dmin,d[G[v][i].to]);
????????????????????????}
????????????????????????rep(i,rG[v].size()){
????????????????????????????????if(rG[v][i].cap>0) dmin = min(dmin,d[rG[v][i].to]);
????????????????????????}
????????????????????????d[v] = dmin + 1;
????????????????}
????????}
}
??
ll V,E,A[1000],B[1000],C[1000];
??
void input(){
????????scanf("%lld%lld",&V,&E);
????????rep(i,E){
????????????????scanf("%lld%lld%lld",&A[i],&B[i],&C[i]);
????????}
}
??
int main()
{
????????input();
????????rep(i,V){
????????????????G[i].clear(); rG[i].clear();
????????}
????????rep(i,E) add_edge(A[i], B[i], C[i]);
????????cout<<max_flow(V,E,0,V-1)<<endl;
}

Compiler output:
a.cc:17:1: error: expected unqualified-id before '?' token
   17 | ??
      | ^
a.cc: In function 'void add_edge(ll, ll, ll)':
a.cc:24:1: error: expected primary-expression before '?' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      | ^
a.cc:24:2: error: expected primary-expression before '?' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |  ^
a.cc:24:3: error: expected primary-expression before '?' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |   ^
a.cc:24:4: error: expected primary-expression before '?' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |    ^
a.cc:24:5: error: expected primary-expression before '?' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |     ^
a.cc:24:6: error: expected primary-expression before '?' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |      ^
a.cc:24:7: error: expected primary-expression before '?' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |       ^
a.cc:24:8: error: expected primary-expression before '?' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |        ^
a.cc:24:9: error: 'G' was not declared in this scope; did you mean 'rG'?
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |         ^
      |         rG
a.cc:24:47: warning: narrowing conversion of 'rG[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'll' {aka 'long long int'} [-Wnarrowing]
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |                                    ~~~~~~~~~~~^~
a.cc:24:52: error: expected ':' before ';' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |                                                    ^
      |                                                    :
a.cc:24:52: error: expected primary-expression before ';' token
a.cc:24:52: error: expected ':' before ';' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |                                                    ^
      |                                                    :
a.cc:24:52: error: expected primary-expression before ';' token
a.cc:24:52: error: expected ':' before ';' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |                                                    ^
      |                                                    :
a.cc:24:52: error: expected primary-expression before ';' token
a.cc:24:52: error: expected ':' before ';' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |                                                    ^
      |                                                    :
a.cc:24:52: error: expected primary-expression before ';' token
a.cc:24:52: error: expected ':' before ';' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |                                                    ^
      |                                                    :
a.cc:24:52: error: expected primary-expression before ';' token
a.cc:24:52: error: expected ':' before ';' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |                                                    ^
      |                                                    :
a.cc:24:52: error: expected primary-expression before ';' token
a.cc:24:52: error: expected ':' before ';' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |                                                    ^
      |                                                    :
a.cc:24:52: error: expected primary-expression before ';' token
a.cc:24:52: error: expected ':' before ';' token
   24 | ????????G[from].pb((edge){to, cap, rG[to].size() });
      |                                                    ^
      |                                                    :
a.cc:24:52: error: expected primary-expression before ';' token
a.cc:25:1: error: expected primary-expression before '?' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      | ^
a.cc:25:2: error: expected primary-expression before '?' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |  ^
a.cc:25:3: error: expected primary-expression before '?' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |   ^
a.cc:25:4: error: expected primary-expression before '?' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |    ^
a.cc:25:5: error: expected primary-expression before '?' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |     ^
a.cc:25:6: error: expected primary-expression before '?' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |      ^
a.cc:25:7: error: expected primary-expression before '?' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |       ^
a.cc:25:8: error: expected primary-expression before '?' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |        ^
a.cc:25:54: error: expected ':' before ';' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |                                                      ^
      |                                                      :
a.cc:25:54: error: expected primary-expression before ';' token
a.cc:25:54: error: expected ':' before ';' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |                                                      ^
      |                                                      :
a.cc:25:54: error: expected primary-expression before ';' token
a.cc:25:54: error: expected ':' before ';' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |                                                      ^
      |                                                      :
a.cc:25:54: error: expected primary-expression before ';' token
a.cc:25:54: error: expected ':' before ';' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |                                                      ^
      |                                                      :
a.cc:25:54: error: expected primary-expression before ';' token
a.cc:25:54: error: expected ':' before ';' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |                                                      ^
      |                                                      :
a.cc:25:54: error: expected primary-expression before ';' token
a.cc:25:54: error: expected ':' before ';' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |                                                      ^
      |                                                      :
a.cc:25:54: error: expected primary-expression before ';' token
a.cc:25:54: error: expected ':' before ';' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |                                                      ^
      |                                                      :
a.cc:25:54: error: expected primary-expression before ';' token
a.cc:25:54: error: expected ':' before ';' token
   25 | ????????rG[to].pb((edge){from, 0, G[from].size()-1} );
      |                                                      ^
      |                                                      :
a.cc:25:54: error: expected primary-expression before ';' token
a.cc: At global scope:
a.cc:27:1: error: expected unqualified-id before '?' token
   27 | ??
      | ^
a.cc:35:1: error: expected unqualified-id before '?' token
   35 | ??
      | ^
a.cc:112:1: error: expected unqualified-id before '?' token
  112 | ??
      | ^
a.cc:114:1: error: expected unqualified-id before '?' token
  114 | ??
      | ^
a.cc:121:1: error: expected unqualified-id before '?' token
  121 | ??
      | ^