| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 671252 | groshi | 악어의 지하 도시 (IOI11_crocodile) | C++17 | 507 ms | 67236 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<iostream>
#include<vector>
#include<queue>
using namespace std;
struct wi{
    vector<int> Q;
    int odw=0;
    int ktory=0;
}*w;
int travel_plan(int n,int m,int R[][2],int L[],int k,int P[])
{
    w=new wi[n+3];
    for(int i=0;i<m;i++)
    {
        int x=R[i][0];
        int y=R[i][1];
        int z=L[i];
        cin>>x>>y>>z;
        w[x].Q.push_back(y);
        w[x].Q.push_back(z);
        w[y].Q.push_back(x);
        w[y].Q.push_back(z);
    }
    priority_queue<pair<int,int> > kolejka;
    for(int i=0;i<k;i++)
    {
        int x=P[i];
        w[x].odw=1;
        for(int j=0;j<w[x].Q.size();j+=2)
        {
            int pom=w[x].Q[j];
            kolejka.push({-w[x].Q[j+1],pom});
        }
    }
    while(!kolejka.empty())
    {
        auto para=kolejka.top();
        kolejka.pop();
        if(w[para.second].odw)
            continue;
        w[para.second].ktory++;
        if(w[para.second].ktory==2)
        {
            if(para.second==0)
                return -para.first;
            w[para.second].odw=1;
            for(int i=0;i<w[para.second].Q.size();i+=2)
            {
                int pom=w[para.second].Q[i];
                if(w[pom].odw)
                    continue;
                kolejka.push({para.first-w[para.second].Q[i+1],pom});
            }
        }
    }
    return -1;
}
컴파일 시 표준 에러 (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... | ||||
