Submission #996719

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9967192024-06-11 06:26:03peraTwo Antennas (JOI19_antennas)C++17
0 / 100
1 ms1628 KiB
#include<bits/stdc++.h>
using namespace std;
const int N = 2000 + 1;
int n , q;
vector<int> A(N) , B(N);
vector<long long> H(N);
vector<vector<int>> turn_on(N) , turn_off(N) ;
vector<vector<long long>> t(4 * N , vector<long long>(2));
void build(int u , int l , int r){
if(l == r){
t[u][0] = 0LL;
t[u][1] = (long long)1e9 + 1;
return;
}
int m = (l + r) / 2;
build(u * 2 , l , m);
build(u * 2 + 1 , m + 1 , r);
t[u][0] = max(t[u * 2][0] , t[u * 2 + 1][0]);
t[u][1] = min(t[u * 2][1] , t[u * 2 + 1][1]);
}
void update(int u , int l , int r , int pos , long long x){
if(l == r){
if(x == -1LL){
t[u][0] = 0LL;
t[u][1] = (long long)1e9 + 1;
}else{
t[u][0] = x;
t[u][1] = x;
}
return;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...