# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
430226 | Abdulmohsen1284 | 말 (IOI15_horses) | C++14 | 43 ms | 16904 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//#include "horses.h"
#include <bits/stdc++.h>
using namespace std;
long long ma=0,mod=1000000007;
long long x[1000005],y[1000005],n,all[500005];
int init(int N, int X[], int Y[]) {
long long horse=1;
n=N;
for(int i=0;i<N;i++)
{
all[i+1]=X[i]*all[i];
x[i]=X[i];
y[i]=Y[i];
}
int st=n-30;
long long bef=0;
if(st<0)
st=0;
for(int i=st;i<n;i++)
{
horse*=x[i];
if(horse*y[i]>=bef)
{
bef=y[i];
horse=1;
ma=(horse*y[i])%mod;
}
}
return ma;
}
int updateX(int pos, int val) {
x[pos]=val;
int st=n-30;
long long horse=1,bef=0;
if(st<0)
st=0;
for(int i=st;i<n;i++)
{
horse*=x[i];
if(horse*y[i]>=bef)
{
bef=y[i];
horse=1;
ma=(horse*y[i])%mod;
}
}
return ma;
}
int updateY(int pos, int val) {
y[pos]=val;
long long horse=1;
int st=n-30;
long long bef=0;
if(st<0)
st=0;
for(int i=st;i<n;i++)
{
horse*=x[i];
if(horse*y[i]>=bef)
{
bef=y[i];
horse=1;
ma=(horse*y[i])%mod;
}
}
return ma;
}
컴파일 시 표준 에러 (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... |