# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
89878 | popovicirobert | Weighting stones (IZhO11_stones) | C++14 | 85 ms | 16932 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define lsb(x) (x & (-x))
#define ll long long
#define ull unsigned long long
#define ld long double
// 217
// 44
using namespace std;
const int MAXN = (int) 1e5;
struct Aint {
int mn, mx;
int lazy;
}aint[4 * MAXN + 1];
inline void solve_lazy(int nod) {
if(2 * nod + 1 <= 4 * MAXN) {
aint[2 * nod].lazy += aint[nod].lazy;
aint[2 * nod + 1].lazy += aint[nod].lazy;
}
aint[nod].mn += aint[nod].lazy;
aint[nod].mx += aint[nod].lazy;
aint[nod].lazy = 0;
}
inline void refresh(int nod) {
if(2 * nod + 1 > 4 * MAXN) {
return ;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |