# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
38866 | 14kg | Horses (IOI15_horses) | C++11 | 183 ms | 19268 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 "horses.h"
#define MOD 1000000007
#define N 500001
#define NN 1048576
struct NUM {
bool big_num;
int num;
void push(bool _big_num, int _num) {
big_num = _big_num, num = _num;
}
} tree1[NN], one;
int n, nn, tree2[NN], Y[N];
NUM mul(NUM x, NUM y) {
long long tx = x.num, ty = y.num, temp = (tx*ty) % MOD;
NUM res;
res.push(tx*ty >= MOD, (int)temp);
return res;
}
long long ll_mul(long long x, long long y) {
return x*y;
}
NUM get_tree1(int lev, int l, int r, int x, int y) {
int mid = (l + r) / 2;
if (x <= l && r <= y) return tree1[lev];
if (r < x || y < l) return one;
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |