# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
309531 | mihai145 | Horses (IOI15_horses) | C++14 | 638 ms | 65528 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"
#include <set>
#include <vector>
#include <algorithm>
const int YMAX = 1e9;
const int MOD = 1e9 + 7;
const int NMAX = 5e5;
int n;
long long x[NMAX + 2], y[NMAX + 2];
struct Aintx {
long long v[4 * NMAX];
void Build(int node, int st, int dr)
{
if(st == dr)
{
v[node] = x[st];
return ;
}
int mid = (st + dr) >> 1;
Build(2 * node, st, mid);
Build(2 * node + 1, mid + 1, dr);
v[node] = (1LL * v[2 * node] * v[2 * node + 1]) % MOD;
}
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... |