# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
795284 | Josia | 말 (IOI15_horses) | C++17 | 1556 ms | 12040 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "horses.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
const ll mod = 1e9+7;
int N;
vector<ll> X, Y;
struct getSol {
int sol = 0;
getSol() {
int currProd = 1;
for (int i = 0; i<N; i++) {
currProd *= X[i];
if (currProd * Y[i] > sol) sol = currProd*Y[i];
}
}
};
signed init(signed _N, signed _X[], signed _Y[]) {
N = _N;
X.resize(N);
Y.resize(N);
for (int i = 0; i<N; i++) X[i] = _X[i];
for (int i = 0; i<N; i++) Y[i] = _Y[i];
return getSol().sol;
}
signed updateX(signed pos, signed val) {
X[pos] = val;
return getSol().sol;
}
signed updateY(signed pos, signed val) {
Y[pos] = val;
return getSol().sol;
}
컴파일 시 표준 에러 (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... |