# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
830909 | rainboy | LIS (INOI20_lis) | C11 | 1503 ms | 46476 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 <stdio.h>
#define N 1000000
#define K 1000000
#define N_ (1 << 20) /* N_ = pow2(ceil(log2(N))) */
unsigned int Z = 12345;
int rand_() {
return (Z *= 3) >> 1;
}
int st[N_ * 2], n_;
void build(int n) {
int i;
n_ = 1;
while (n_ < n)
n_ <<= 1;
for (i = 0; i < n_; i++)
st[n_ + i] = i < n ? 1 : 0;
for (i = n_ - 1; i > 0; i--)
st[i] = st[i << 1 | 0] + st[i << 1 | 1];
}
void update(int i, int x) {
for (i += n_; i > 0; i >>= 1)
st[i] += x;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |