# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
944319 | vjudge1 | Nicelines (RMI20_nicelines) | C++17 | 4 ms | 1112 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 "nice_lines.h"
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
using ldouble = long double;
using point = pair<lint, ldouble>;
const ldouble EPS = 1e-9;
const lint INF = 2.1e8;
const lint MAXV = 1e4;
const lint BASE = 2e4 + 1;
class Line {
public:
ldouble a, b;
ldouble get(ldouble x) { return a * x + b; }
Line(ldouble a, ldouble b) : a(a), b(b) {}
Line(ldouble x1, ldouble y1, ldouble x2, ldouble y2) {
a = (y1 - y2) / (x1 - x2);
b = y1 - a * x1;
}
};
void solve(int subtask_id, int N) {
int query_count = 0;
map<lint, ldouble> memo;
const auto Query = [&](lint y) {
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |