Submission #1299263

#TimeUsernameProblemLanguageResultExecution timeMemory
1299263alexrana2626Obstacles for a Llama (IOI25_obstacles)C++20
Compilation error
0 ms0 KiB
#include "obstacles.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> v;

void initialize(vector<int> T, vector<int> H) 
{
    for (int i = 0; i < H.size(); i++)
    {
    	if (T[0] <= H[i]) v.push_back(i);
	}
}

bool can_reach(int L, int R, int S, int D) 
{
	auto it = lowerbound(v.begin(), v.end(), S);
	if (*it < D)
	{
		return false;
	}
	return true;
}

Compilation message (stderr)

obstacles.cpp: In function 'bool can_reach(int, int, int, int)':
obstacles.cpp:16:19: error: 'lowerbound' was not declared in this scope; did you mean 'lround'?
   16 |         auto it = lowerbound(v.begin(), v.end(), S);
      |                   ^~~~~~~~~~
      |                   lround