# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
299157 | Haunted_Cpp | Horses (IOI15_horses) | C++17 | 1533 ms | 49620 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 <bits/stdc++.h>
using namespace std;
const int MAX_N = 5e5 + 5;
const int MAX_K = 50 + 5;
const int MOD = 1e9 + 7;
int _N;
vector<int> _X(MAX_N), _Y(MAX_N);
set<int> non_one;
int mult(int a, int b) {
long long res = 1LL * a * b;
if (res >= MOD) res %= MOD;
return res;
}
class SegmentTree {
private:
struct Node {
int product;
int opt;
Node() {
product = 1;
opt = -1;
}
void merge(Node l, Node r, int rightmost) {
product = mult(l.product, r.product);
opt = l.opt;
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... |