Submission #409552

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4095522021-05-21 04:38:03CursedCodeTravelling Merchant (APIO17_merchant)C++14
100 / 100
121 ms4208 KiB
#include <bits/stdc++.h>
using namespace std;
long long n,m,k;
long long buy[105][1005],sell[105][1005];
long long adj[105][105],efficent[105][105];
long long profit[105][105];
const long long inf=2e9;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> n >> m >> k;
for(int i = 1;i <= n;i++){
for(int j = 1;j <= k;j++) cin >> buy[i][j] >> sell[i][j];
}
for(int i = 1;i <= n;i++){
for(int j = 1;j <= n;j++) adj[i][j] = inf;
}
for(int i = 1;i <= m;i++){
long long u,v,w;
cin >> u >> v >> w;
adj[u][v] = w;
}
for(int l = 1;l <= n;l++){
for(int i = 1;i <= n;i++){
for(int j = 1;j <= n;j++){
adj[i][j] = min(adj[i][j] , adj[i][l] + adj[l][j]);
}
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...