# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
983539 | Abito | Travelling Merchant (APIO17_merchant) | C++17 | 104 ms | 2280 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>
#define F first
#define S second
#define pb push_back
#define ppb pop_back
#define ep insert
#define endl '\n'
#define elif else if
#define pow pwr
#define sqrt sqrtt
#define int long long
#define y1 YONE
typedef unsigned long long ull;
using namespace std;
const int N=105,KK=1005;
int n,m,K,dis[N][N],b[N][KK],s[N][KK];
bool vis[N];
pair<int,int> eff[N][N];
vector<pair<int,int>> adj[N];
void dijkstra(int s){
for (int i=1;i<=n;i++) vis[i]=0,dis[s][i]=-1;
dis[s][s]=0;
priority_queue<pair<int,int>> pq;
pq.push({0,s});
while (!pq.empty()){
int x=pq.top().S;
pq.pop();
if (vis[x]) continue;
vis[x]=1;
for (auto u:adj[x]){
# | 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... |