# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
571821 | beaconmc | 말 (IOI15_horses) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
typedef long long ll;
#define ll int
#define FOR(i,x,y) for(ll i=x; i<y; i++)
#define FORNEG(i,x,y) for(ll i=x; i>y; i--)
#define double long double
#include "horses.h"
using namespace std;
vector<ll> x, y;
ll n;
int init(int N, int X[], int Y[]) {
n = N;
x.push_back(X[0]);
y.push_back(Y[0]);
FOR(i,1,N){
x.push_back(x[i-1] * X[i]);
y.push_back(Y[i]);
}
ll maxi = -1;
FOR(i,0,N){
maxi = max(maxi, X[i] * Y[i]);
}
return maxi;
}
int updateX(int pos, int val) {
x[pos] = val;
FOR(i,pos+1,n){
x[i] *= x[i-1];
}
ll maxi = -1;
FOR(i,0 n){
maxi = max(maxi, X[i] * Y[i]);
}
return maxi;
}
int updateY(int pos, int val) {
y[pos] = val;
ll maxi = -1;
FOR(i,0 n){
maxi = max(maxi, X[i] * Y[i]);
}
return maxi;
}