# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
57279 | IvanC | Travelling Merchant (APIO17_merchant) | C++17 | 155 ms | 10244 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 110;
const int MAXM = 1010;
const ll INF = 1e17;
ll compra[MAXN][MAXM],venda[MAXN][MAXM];
ll matriz[MAXN][MAXN],lucro[MAXN][MAXN];
int chega[MAXN][MAXN],existe[MAXN][MAXN];
ll shortest_path[MAXN][MAXN];
int N,M,K;
int FloydWarshall(ll X){
for(int i = 1;i<=N;i++){
for(int j = 1;j<=N;j++){
shortest_path[i][j] = INF;
existe[i][j] = 0;
}
}
for(int i = 1;i<=N;i++){
for(int j = 1;j<=N;j++){
if(!chega[i][j]) continue;
shortest_path[i][j] = X*matriz[i][j] - lucro[i][j];
existe[i][j] = 1;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |