| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 782720 | vjudge1 | 사이버랜드 (APIO23_cyberland) | C++17 | 29 ms | 8052 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl "\n"
#define ll long long
#define pb push_back
#define uwu 100005
vector<pair<int,int>>adj[uwu];
double solve(int N, int M, int K, int H, vector<int> x, vector<int>y, vector<int> c, vector<int> arr){
int father[N];
double yol[N];
for(int i=0;i<N;i++){
father[i]=-1;
yol[i]=1000000000000;
}
for(int i=0;i<M;i++){
adj[x[i]].pb({y[i],c[i]});
adj[y[i]].pb({x[i],c[i]});
}
priority_queue<tuple<double,int,int>> pq;
pq.push({-0.0,0,-1});
while(pq.size()){
ll int node,once;double deg;
tie(deg,node,once)=pq.top();deg=-deg;
pq.pop();
//cout<<node<<" "<<once<<" "<<" "<<deg<<" "<<endl;
if(yol[node]<=deg)continue;
if(arr[node]==0){
deg=0;
}
yol[node]=deg;
father[node]=once;
for(auto u:adj[node]){
int kim=u.first;double lira=u.second;
if(yol[kim]>deg+lira){
pq.push({-(deg+lira),kim,node});
}
}
}
/*for(int i=0;i<N;i++)cout<<yol[i]<<" ";
cout<<endl;
for(int i=0;i<N;i++)cout<<father[i]<<" ";
cout<<endl;*/
for(int i=0;i<N;i++)adj[i].clear();
return yol[H];
}
컴파일 시 표준 에러 (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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
