# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
80301 | Plurm | Travelling Merchant (APIO17_merchant) | C++11 | 130 ms | 1792 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;
int b[128][1024];
int s[128][1024];
int profit[128][128];
long long d1[128][128];
long long d2[128][128];
int main(){
int n,m,k;
scanf("%d%d%d",&n,&m,&k);
for(int i = 1; i <= n; i++){
for(int j = 1; j <= k; j++){
scanf("%d%d",&b[i][j],&s[i][j]);
}
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
for(int l = 1; l <= k; l++){
if(b[i][l] != -1 && s[j][l] != -1){
profit[i][j] = max(profit[i][j],s[j][l] - b[i][l]);
}
}
d1[i][j] = 1e18;
}
}
for(int i = 1; i <= m; i++){
int v,w,t;
scanf("%d%d%d",&v,&w,&t);
d1[v][w] = t;
}
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... |