Submission #1301020

#TimeUsernameProblemLanguageResultExecution timeMemory
1301020tamir1Migrations (IOI25_migrations)C++20
0 / 100
28 ms436 KiB
#include "migrations.h"

int depth[10005];
int mx = 0;
int id = -1;


int send_message(int N, int i, int Pi) {
  depth[i] = depth[Pi];
  if(mx < depth[i]) {
    mx = depth[i];
    id = i;
  }
  if(i == N - 1) return id;
  return 0;
}

std::pair<int, int> longest_path(std::vector<int> S) {
  return {0, S.back()};
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...