# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
782720 | 2023-07-14T08:27:35 Z | vjudge1 | 사이버랜드 (APIO23_cyberland) | C++17 | 29 ms | 8052 KB |
#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]; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 16 ms | 2844 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 18 ms | 3184 KB | Correct. |
2 | Correct | 29 ms | 3624 KB | Correct. |
3 | Correct | 20 ms | 3608 KB | Correct. |
4 | Correct | 21 ms | 3652 KB | Correct. |
5 | Correct | 21 ms | 3748 KB | Correct. |
6 | Correct | 18 ms | 4336 KB | Correct. |
7 | Correct | 24 ms | 4436 KB | Correct. |
8 | Correct | 12 ms | 4688 KB | Correct. |
9 | Correct | 20 ms | 3412 KB | Correct. |
10 | Correct | 20 ms | 3424 KB | Correct. |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 23 ms | 3664 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 29 ms | 8052 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 18 ms | 3688 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 22 ms | 3608 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 22 ms | 3788 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 23 ms | 3548 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |