Submission #981172

#TimeUsernameProblemLanguageResultExecution timeMemory
981172LibSwapping Cities (APIO20_swap)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int n,m; vector <vector <int> > InComponents; vector <int> TVector; struct Edge{ long long Weight; int Start; int End; }; bool operator< (const edge &x, const edge &y){ return x.Weight<y.Weight; } Edge Elist[500003]; int Depth[500003]; void init(int N, int M, vector <int> U, vector <int> V, vector <int> W){ n=N; m=M; for(int i=0;i<n+m+5;i++){ InComponents.push_back(TVector); } for(int i=0;i<m;i++){ Elist[i].Weight=W[i]; Elist[i].Start=U[i]; Elist[i].End=V[i]; } } int getMinimumFuelCapacity(int x, int y){ return 1; }

Compilation message (stderr)

swap.cpp:11:23: error: 'edge' does not name a type; did you mean 'Edge'?
   11 | bool operator< (const edge &x, const edge &y){
      |                       ^~~~
      |                       Edge
swap.cpp:11:38: error: 'edge' does not name a type; did you mean 'Edge'?
   11 | bool operator< (const edge &x, const edge &y){
      |                                      ^~~~
      |                                      Edge
swap.cpp:11:6: error: 'bool operator<(const int&, const int&)' must have an argument of class or enumerated type
   11 | bool operator< (const edge &x, const edge &y){
      |      ^~~~~~~~