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