# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
882728 | Onur_Ilgaz | Jakarta Skyscrapers (APIO15_skyscraper) | C++17 | 580 ms | 7632 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define fast cin.tie(0)->sync_with_stdio(0);
#define int long long
#define inf ((int)1e18)
using namespace std;
int32_t main(){
fast
int n, m;
cin >> n >> m;
vector<vector<int> > guy(n);
int st = -1, to = -1;
for(int i = 0; i < m; i++) {
int a, b;
cin >> a >> b;
if(st == -1) st = a;
else if(to == -1) to = a;
guy[a].push_back(b);
}
priority_queue <pair<int, int> > pq;
vector <int> dis(n, inf);
dis[st] = 0;
pq.push({0, st});
bitset <200000> calc;
while(!pq.empty()) {
int val = -pq.top().first, node = pq.top().second;
// cout << node << ": \n";
pq.pop();
if(calc[node]) continue;
calc[node] = 1;
# | 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... |