Submission #1233275

#TimeUsernameProblemLanguageResultExecution timeMemory
1233275thelegendary08Swapping Cities (APIO20_swap)C++17
6 / 100
74 ms13488 KiB
#include "swap.h" #include<bits/stdc++.h> #define int long long #define mp make_pair #define pb push_back #define f0r(i,n) for(signed i = 0; i<n; i++) #define FOR(i, k, n) for(signed i = k; i<n; i++) #define vi vector<int> #define vpii vector<pair<int,int>> #define pii pair<int,int> #define vb vector<bool> #define mii map<int,int> #define vvi vector<vector<int>> #define vout(v) for(auto u : v)cout<<u<<' '; cout<<endl; #define dout(a) cout<<a<<' '<<#a<<endl; #define dout2(a,b) cout<<a<<' '<<#a<<' '<<b<<' '<<#b<<endl; using namespace std; vector<vpii> adj; int maxw, ispath; int n,m; void init(signed N, signed M, std::vector<signed> U, std::vector<signed> V, std::vector<signed> W) { n = N; m = M; adj.resize(N); f0r(i, M){ adj[U[i]].pb(mp(V[i], W[i])); adj[V[i]].pb(mp(U[i], W[i])); } maxw = -4e18; f0r(i, M){ maxw = max(maxw, (int)W[i]); } if(M == N-1)ispath = 1; else ispath = 0; } signed getMinimumFuelCapacity(signed X, signed Y) { if(ispath)return -1; else return maxw; }
#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...