제출 #1302736

#제출 시각아이디문제언어결과실행 시간메모리
1302736alexrana2626Migrations (IOI25_migrations)C++20
컴파일 에러
0 ms0 KiB
#include "migrations.h"
#include <bits/stdc++.h>
int a[100001], id, mx = -1;
int send_message(int N, int i, int Pi) 
{
   a[i] = a[Pi] + 1;
   if (a[i] > mx)
   {
   	    mx = a[i];
   	    id = i;
   }
   if (i == N - 1) return id;
}

pair<int, int> longest_path(vector<int> S) 
{
    return {0, S.back()};
}

컴파일 시 표준 에러 (stderr) 메시지

migrations.cpp:15:1: error: 'pair' does not name a type
   15 | pair<int, int> longest_path(vector<int> S)
      | ^~~~
migrations.cpp: In function 'int send_message(int, int, int)':
migrations.cpp:13:1: warning: control reaches end of non-void function [-Wreturn-type]
   13 | }
      | ^