#include<iostream>
#include<vector>
#include"minecraft.h"
using namespace std;
int find(int c, int N)
{
    int l = c, r = N;
    while(l < r)
    {
        int m = (l+r)/2;
        if(find_portals(l, m)) r = m;
        else l = m+1;
    }
    return l;
}
vector<int> portals(int N, int K)
{
    vector<int> ans;
    int l = 1, found = 0;
    while(found!=K)
    {
        ans.push_back(find(l, N));
        l = ans.back()+1;
        found++;
    }
    return ans;
}
pair<int, int> minimal_danger(int N, vector<pair<int, pair<int, int>>> paths, vector<int> portals, vector<int> fortresses)
{
    return {0, 1};
}
pair<int, int> find_end_portal(int L)
{
    return {0, 0};
}