Submission #750328

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7503282023-05-29 11:45:34boris_7Travelling Merchant (APIO17_merchant)C++17
100 / 100
170 ms2432 KiB
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
int n,m,k;
cin>>n>>m>>k;
vector<vector<ll>>b(n,vector<ll>(k)),s(n,vector<ll>(k));
for(int i = 0;i<n;i++){
for(int j = 0;j<k;j++){
cin>>b[i][j]>>s[i][j];
}
}
vector<vector<pair<ll,ll>>>gp(n);
vector<vector<ll>>d(n,vector<ll>(n,1e18));
for(int i = 0;i<m;i++){
int u,v,w;
cin>>u>>v>>w;
gp[--u].push_back({--v,w});
d[u][v]=w;
}
for(int p = 0;p<n;p++){
for(int i = 0;i<n;i++){
for(int j = 0;j<n;j++){
d[i][j] = min(d[i][j],d[i][p]+d[p][j]);
}
}
}
vector<vector<ll>>max_delta(n,vector<ll>(n));
for(int p = 0;p<k;p++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...