# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1127365 | daoquanglinh2007 | Jakarta Skyscrapers (APIO15_skyscraper) | C++20 | 69 ms | 700 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair <int, int>
#define fi first
#define se second
#define mp make_pair
const int NM = 30000, MM = 2000, inf = 1e18;
int N, M, B[MM+5], P[MM+5];
int d[MM+5];
priority_queue <pii, vector <pii>, greater <pii> > pq;
void dijkstra(){
for (int i = 0; i < M; i++) d[i] = +inf;
d[0] = 0;
while (!pq.empty()) pq.pop();
pq.push(mp(0, 0));
while (!pq.empty()){
int u = pq.top().se;
if (d[u] != pq.top().fi){
pq.pop();
continue;
}
pq.pop();
for (int v = 0; v < M; v++){
if ((B[u]-B[v])%P[u] != 0) continue;
# | 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... |