| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 424430 | Ozy | Horses (IOI15_horses) | C++17 | 14 ms | 8388 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) {
if (i > 0) x[i] = X[i] * x[i-1];
else x[i] = X[i];
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];
MAX = 0;
rep(i,0,n-1) {
if (i >= pos){
x[i] /= pas;
x[i] *= val;
}
a = x[i]*y[i];
if (a > MAX) MAX = a;
}
return MAX;
}
int updateY(int pos, int val) {
MAX = 0;
rep(i,0,n-1) {
if (i == pos) y[i] = val;
a = x[i]*y[i];
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... | ||||
