# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
603321 | chirathnirodha | Horses (IOI15_horses) | C++17 | 609 ms | 80400 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;
#define PB push_back
#define MP make_pair
#define P push
#define I insert
#define F first
#define S second
typedef long long ll;
const ll mod=1e9+7;
const int maxn=500000;
int n;
ll segx[4*maxn],segy[4*maxn];
ll co[maxn],pr[maxn];
set<int> notone;
void updx(ll a,ll b,int c,ll x,int y){
if(a==b){
segx[c]=x;
return;
}
ll m=(a+b)/2;
if(y<=m)updx(a,m,2*c,x,y);
else updx(m+1,b,2*c+1,x,y);
segx[c]=(segx[2*c]*segx[2*c+1])%mod;
}
ll findx(ll a,ll b,ll c,ll x,ll y){
if(a==x && b==y)return segx[c];
ll m=(a+b)/2;
if(y<=m)return findx(a,m,2*c,x,y);
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... |