# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1258201 | mkkkkkkkk | 이주 (IOI25_migrations) | C++20 | 28 ms | 456 KiB |
#include "migrations.h"
#include <bits/stdc++.h>
using namespace std;
int dist[10000]={};
int last=0;
int send_message(int N, int i, int Pi)
{
dist[i]=dist[Pi]+1;
if(dist[i]>=dist[last])
{
last=i;
}
if(i-last==999)
return 4;
else if(i-last==99 && last>=9000)
{
return 3;
}
else if(i-last==9 && last>=9900)
{
return 2;
}
else if(i-last==0 && last>=9990)
{
return 1;
}
else
return 0;
}
pair<int, int> longest_path(vector<int> S) {
for(int i=S.size()-1;i>=0;i--)
{
if(S[i]!=0)
{
if(S[i]==4)
{
return {0,i-999};
}
else if(S[i]==3)
{
return {0,i-99};
}
else if(S[i]==2)
{
return {0,i-9};
}
else if(S[i]==1)
{
return {0,i};
}
}
}
}
컴파일 시 표준 에러 (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... |