# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1004440 | vjudge1 | 말 (IOI15_horses) | C++17 | 99 ms | 177236 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define pb push_back
#define pf push_front
#define pi pair<int,int>
#define vi vector<int>
int n ;
vi x, y;
ll dp[1000][10002];
ll init(int N, int X[], int Y[]){
n = N;
x.resize(N);
y.resize(N);
for(int i =0; i < n; i++){
x[i] =X[i];
y[i] = Y[i];
}
ll final = 0;
for(int i = 0; i <= n; i++){
for(int j= 0; j < 10001;j++){
dp[i][j]=-LLONG_MAX;
}
}
dp[0][1]=0;
ll ans = 0;
ll have = 1;
for(int i = 1; i <= n; i++){
have *= x[i-1];
ans = max(ans, have*(y[i-1]));
}
return ans;
}
ll updateX(int pos, int val){
x[pos]=val;
ll ans = 0;
ll have = 1;
for(int i = 1; i <= n; i++){
have *= x[i-1];
ans = max(ans, have*(y[i-1]));
}
return ans;
}
ll updateY(int pos, int val){
y[pos]=val;
ll ans = 0;
ll have = 1;
for(int i = 1; i <= n; i++){
have *= x[i-1];
ans = max(ans, have*(y[i-1]));
}
return 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... |