#include "minecraft.h"
#include <bits/stdc++.h>



using namespace std;


int n, k;
vector<int>ans;

vector<int> dnc(int l, int r)
{
    int counter = find_portals(l, r);
    if(counter == 0)return {};
    if(counter == 0)
    {
        vector<int>curr;
        for(int i = l; i <= r; i++)
        {
            curr.push_back(i);
        }
        return curr;
    }
    
    int mid = (l + r) / 2;
    
    vector<int>curr;
    vector<int>cur1 = dnc(l, mid);
    vector<int>cur2 = dnc(mid + 1, r);
    
    for(auto i: cur1)
    {
        curr.push_back(i);
    }
    for(auto i: cur2)
    {
        curr.push_back(i);
    }
    return cur;
}

std::vector<int> portals(int N, int K)
{
    n = N; k = K;
    //int find_portals(int l, int r);
    return dnc(1, n);
}


std::pair<int, int> minimal_danger(int N, std::vector<std::pair<int, std::pair<int, int>>> paths, std::vector<int> portals, std::vector<int>fortresses)
{
    
}


std::pair<int, int> find_end_portal(int L)
{
    //std::string throw_eye(std::pair<int, int> coordinates);
}