Submission #984809

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9848092024-05-17 05:54:08vjudge2Fish 3 (JOI24_fish3)C++17
100 / 100
606 ms65260 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 1e18;
struct node {
int sum, sz, mx;
};
struct segtree {
int size = 1;
vector<node> seg;
vector<int> lazy;
void init(int n) {
while (size < n) size *= 2;
seg.assign(2 * size + 1, (node) {0, 0, 0});
lazy.assign(2 * size + 1, -1);
}
void pull(int id) {
seg[id].sum = seg[id * 2].sum + seg[id * 2 + 1].sum;
seg[id].sz = seg[id * 2].sz + seg[id * 2 + 1].sz;
seg[id].mx = max(seg[id * 2].mx, seg[id * 2 + 1].mx);
}
void build(int l, int r, int id) {
if (l == r) {
seg[id].sz = 1;
return;
}
int mid = (l + r) / 2;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...
#Verdict Execution timeMemoryGrader output
Fetching results...