# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1160896 | Otalp | Travelling Merchant (APIO17_merchant) | C++20 | 43 ms | 1352 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pii pair<int, int>
#define ff first
#define ss second
#define unm unordered_map
const ll mod = 1e9 + 7;
const int MAXN = 2e5 + 5;
const int MAXA = 2e5 + 5;
const ll INF = 1e18;
vector<int> q[101], dq[101];
int n, m, k;
int b[101][1001], s[101][1001];
ll dp[101][101], d[101][101];
ll c[101][101];
vector<int> ord;
int pos[101];
void dfs0(int v){
pos[v] = 1;
for(int to: q[v]){
if(pos[to]) continue;
dfs0(to);
}
ord.pb(v);
}
# | 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... |