| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 467026 | Carmel_Ab1 | Horses (IOI15_horses) | C++17 | 1568 ms | 11980 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "horses.h"
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
typedef vector<ll> vl;
//#include "grader.cpp"
vl x,y;
void chkmax(ll& ans,ll has,ll p){
ll mod=1e9+7;
if(log10(ans)<log10(has)+log10(p))
ans=((has%mod)*(p%mod))%mod;
}
int init(int n, int X[], int Y[]) {
x.resize(n);
y.resize(n);
const ll mod=1e9+7;
ll has=1,ans=0;
for(int i=0; i<n; i++)
x[i]=ll(1ll*X[i]),y[i]=ll(1ll*Y[i]);
for(int i=0; i<n; i++){
has*=x[i];
chkmax(ans,has,y[i]);
assert(ans<mod);
}
return int(ans);
}
int updateX(int pos, int val) {
const ll mod=1e9+7;
ll has=1,ans=0;
x[pos]=ll(val);
int n=x.size();
for(int i=0; i<n; i++){
has*=x[i];
chkmax(ans,has,y[i]);
assert(ans<mod);
}
return int(ans);
}
int updateY(int pos, int val) {
const ll mod=1e9+7;
ll has=1,ans=0;
y[pos]=ll(val);
int n=x.size();
for(int i=0; i<n; i++){
has*=x[i];
chkmax(ans,has,y[i]);
assert(ans<mod);
}
return int(ans);
}컴파일 시 표준 에러 (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... | ||||
