# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
424427 | Ozy | Horses (IOI15_horses) | C++17 | 15 ms | 10444 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "horses.h"
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for (int i = (a); i <= (b); i++)
#define repa(i,a,b) for (int i = (a); i >= (b); i--)
#define lli long long int
#define debugsl(a) cout << #a << " = " << a << ", "
#define debug(a) cout << #a << " = " << a << endl
lli x[1002],y[1002],n,MAX,a;
int init(int N, int X[], int Y[]) {
n = N;
MAX = 0;
rep (i,0,n-1) {
x[i] = X[i] + x[i-1];
y[i] = Y[i];
a = x[i] * y[i];
if (a > MAX) MAX = a;
}
return MAX;
}
int updateX(int pos, int val) {
lli pas = x[pos];
rep(i,pos,n-1) {
x[i] /= pas;
x[i] *= val;
a = x[i]*y[i];
if (a > MAX) MAX = a;
}
return MAX;
}
int updateY(int pos, int val) {
y[pos] = val;
a = y[pos] * x[pos];
if (a > MAX) MAX = a;
return MAX;
}
Compilation message (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... |