| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 596380 | ibm2006 | Flights (JOI22_flights) | C++17 | 2 ms | 2760 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Ali.h"
#include <string>
#include <vector>
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
ll n,i,h[110000],a[110000],t;
vector<ll> v[110000];
string s;
void f(ll x,ll y)
{
    a[x]=t;
    t++;
    ll i;
    for(i=0;i<h[x];i++)
    {
        if(y==v[x][i])
            continue;
        f(v[x][i],x);
    }
}
void Init(int N,vector<int> U,vector<int> V) {
   n=N;
   for(i=0;i<(n-1);i++)
   {
       v[U[i]].push_back(V[i]);
       v[V[i]].push_back(U[i]);
   }
   for(i=0;i<n;i++)
    h[i]=v[i].size();
   f(0,-1);
   for(i=0;i<n;i++)
    h[a[i]]=v[i].size()-1;
   h[0]++;
   for(i=0;i<n;i++)
    SetID(i,a[i]);
}
string SendA(string S) {
  for(i=0;i<n;i++)
  {
      if(h[i]==0)
        s+="00";
      else if(h[i]==1)
        s+="01";
      else if(h[i]==2)
        s+="10";
      else
        s+="11";
  }
  return s;
}
#include "Benjamin.h"
#include <string>
#include <vector>
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
ll n,x,y,h[110000],t;
vector<ll> v[110000];
string s;
string SendB(int N, int X, int Y) {
  n=N;  x=X;  y=Y;
  return "00000111110000011111";
}
void f(ll x)
{
    h[x]=(s[t]-'0')*2+s[t+1]-'0';
    
    ll i;
    for(i=0;i<h[x];i++)
    {
        t+=2;
        v[x].push_back(t/2);
        v[t/2].push_back(x);
        f(t/2);
    }
}
ll g(ll z,ll w)
{
    if(z==y)
        return 0;
    ll i,k;
    for(i=0;i<h[z];i++)
    {
        if(w==v[z][i])
            continue;
        k=g(v[z][i],z);
        if(k!=-1)
            return k+1;
        
    }
    return -1;
}
 
int Answer(string T) {
  s=T;
  f(0);
  return g(x,-1);
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
