# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
416895 | Mamnoon_Siam | Wild Boar (JOI18_wild_boar) | C++17 | 18102 ms | 679576 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;
using ii = pair<int, int>;
using ll = long long;
using vi = vector<int>;
#define fi first
#define se second
#define all(v) begin(v), end(v)
#define sz(v) (int)(v.size())
using pli = pair<ll, int>;
template<typename T>
inline void chkmin(T& x, T y) {
x = x < y ? x : y;
}
const ll inf = 1e18;
tuple<ll,int,int> shortest_path(vector<pair<ii,ll>>& ls, int anot, int bnot) {
// best path *---a--->--...-->---b---* in ls s.t. a != anot, b != bnot
tuple<ll,int,int> opt{inf, -1, -1};
for(auto [pa, w] : ls) {
auto [s, t] = pa;
if(s != anot and t != bnot) {
opt = min(opt, make_tuple(w, s, t));
}
}
return opt;
}
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... |