# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
225567 | nickmet2004 | Horses (IOI15_horses) | C++11 | 780 ms | 40576 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>
#define ll long long
using namespace std;
const int N = 500005;
const ll mod = 1e9 + 7;
int n;
set<int> changes;
vector<int> x , y;
ll xmult = 1;
int T[1 << 20];
ll Pow(ll a, ll p)
{
if (p == 0) return 1;
if (p & 1) return (a * Pow(a, p - 1)) % mod;
return Pow((a * a) % mod, p / 2);
}
inline ll Inv(ll a) {return Pow(a % mod, mod - 2);}
void upd(int idx , int v , int l = 0 , int r = n - 1 , int pos = 0){
if(l == r){
T[pos] = v;
return;
}
int mid = (l + r) >> 1;
if(idx <= mid) upd(idx , v , l , mid , pos * 2 + 1);
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... |