Submission #1302737

#TimeUsernameProblemLanguageResultExecution timeMemory
1302737alexrana2626Migrations (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;
   return 0;
}

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

Compilation message (stderr)

migrations.cpp:16:1: error: 'pair' does not name a type
   16 | pair<int, int> longest_path(vector<int> S)
      | ^~~~