Submission #982329

#TimeUsernameProblemLanguageResultExecution timeMemory
982329simona1230Swapping Cities (APIO20_swap)C++17
0 / 100
131 ms25388 KiB
#include "swap.h" #include <bits/stdc++.h> using namespace std; int maxx=0; int n,m,x,y; vector<int> v[100001],w[100001],num[100001]; struct edge { int x,d; edge(){} edge(int _x,int _d) { x=_x; d=_d; } bool operator<(const edge&e)const { return e.d<d; } }; bool sec=1; void init(int N, int M,std::vector<int> U, std::vector<int> V, std::vector<int> W) { n=N; m=M; for(int i=0;i<m;i++) { if(U[i]!=0)sec=0; v[U[i]].push_back(V[i]); v[V[i]].push_back(U[i]); w[U[i]].push_back(W[i]); w[V[i]].push_back(W[i]); num[U[i]].push_back(i); num[V[i]].push_back(i); maxx=max(maxx,(int)v[U[i]].size()); maxx=max(maxx,(int)v[V[i]].size()); } } int getMinimumFuelCapacity(int X, int Y) { x=X; y=Y; if(maxx<=2) return -1; }

Compilation message (stderr)

swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:50:1: warning: control reaches end of non-void function [-Wreturn-type]
   50 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...