#include <bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
#define ertunt return
#define vodka void
using namespace std;
vector<ll> z_function(string s){
ll n = s.size();
vector<ll>z(n);
for(ll i = 1,l = 0, r = 0; i < n; i++){
if(i <= r){
z[i] = min(z[i-l],r-i+1);
}
while(i + z[i] < n and s[z[i]] == s[i+z[i]])z[i]++;
if(i + z[i] -1 > r){
l = i;
r = i+z[i]-1;
}
}
ertunt z;
}
void buildWall(int n, int k, int op[], int l[], int r[], int h[], int H[]){
for(int i = 0; i < k; i++){
for(int j = l[i]; j <= r[i]; j++){
if(op[i] == 1){
H[j] = max(H[j],h[i]);
}
else{
H[j] = min(H[j],h[i]);
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |