| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1300776 | nataliaa | 장애물 (IOI25_obstacles) | C++20 | 0 ms | 0 KiB |
//#include "obstacles.h"
#include<bits/stdc++.h>
using namespace std;
bool t;
int n, m;
vector<int> t;
void initialize(vector<int> T, vector<int> H){
n = T.size(), m = H.size();
for(int i = 1; i <n; i++ ) {
if(T[i]<T[i-1]) {
t = false; break;
}
}
for(int i = 0; i <m; i++){
if(T[n-1]<=H[i]) f[i+1]++;
}
for(int i = 1; i < m; i++){
f[i+1]+=f[i];
}
}
bool can_reach(int l, int r, int s, int d){
if(s==d) return true;
if(s>d) swap(s,d);
if(f[d]-f[s]==0) return true;
return false;
}
