# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
109948 | PeppaPig | Jakarta Skyscrapers (APIO15_skyscraper) | C++14 | 509 ms | 190100 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 pii pair<int, int>
#define x first
#define y second
using namespace std;
const int N = 3e4+5;
const int M = 2e3+5;
int n, m, st, en;
int d[N], chk[N][M];
vector<int> B[N];
int main() {
fill_n(d, N, 1e9);
scanf("%d %d", &n, &m);
for(int i = 0, b, p; i < m; i++) {
scanf("%d %d", &b, &p);
B[b].emplace_back(p);
if(i == 0) st = b;
if(i == 1) en = b;
}
for(int i = 0; i < n; i++) {
sort(B[i].begin(), B[i].end());
B[i].resize(unique(B[i].begin(), B[i].end()) - B[i].begin());
}
priority_queue<pii, vector<pii>, greater<pii> > Q;
Q.emplace(d[st] = 0, st);
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |