Submission #1302736

#TimeUsernameProblemLanguageResultExecution timeMemory
1302736alexrana2626Migrations (IOI25_migrations)C++20
Compilation error
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()};
}

Compilation message (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 | }
      | ^