# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
432663 | daniel920712 | Horses (IOI15_horses) | C++14 | 31 ms | 15376 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "horses.h"
#include <iostream>
using namespace std;
long long XX[100005];
long long YY[100005];
long long how[100005]={0};
long long MOD=1e9+7;
long long N;
int init(int N, int X[], int Y[])
{
long long ans=0,t=1,i,now=0;
::N=N;
for(i=0;i<N;i++)
{
XX[i]=(long long) X[i];
YY[i]=(long long) Y[i];
}
for(i=N-1;i>=0;i--)
{
if(Y[i]>now)
{
now=YY[i];
t=YY[i];
}
t*=XX[i];
t%=MOD;
if(now<1000000000) now*=XX[i];
}
return (int) t;
}
int updateX(int pos, int val)
{
long long ans=0,t=1,i,now=0;
XX[pos]=(long long) val;
for(i=N-1;i>=0;i--)
{
if(YY[i]>now)
{
now=YY[i];
t=YY[i];
}
t*=XX[i];
t%=MOD;
if(now<1000000000) now*=XX[i];
}
return (int) t;
}
int updateY(int pos, int val)
{
long long ans=0,t=1,i,now=0;
YY[pos]=(long long) val;
for(i=N-1;i>=0;i--)
{
if(YY[i]>now)
{
now=YY[i];
t=YY[i];
}
t*=XX[i];
t%=MOD;
if(now<1000000000) now*=XX[i];
}
return (int) t;
}
컴파일 시 표준 에러 (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... |