# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
960516 | thinknoexit | Security Guard (JOI23_guard) | C++17 | 191 ms | 21016 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 ll = long long;
const int N = 200200;
int a[N];
struct A {
int v, w;
bool operator < (const A& o) const {
if (w != o.w) return w > o.w;
return a[v] > a[o.v];
}
};
priority_queue<A> pq;
int dis[N];
bool vis[N];
vector<int> adj[N];
ll ans = 0;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
memset(dis, 0x3f, sizeof dis);
int n, m, q;
cin >> n >> m >> q;
for (int i = 1;i <= n;i++) {
cin >> a[i];
}
while (m--) {
int u, v;
cin >> u >> v;
adj[u].push_back(v);
adj[v].push_back(u);
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |