Submission #739514

# Submission time Handle Problem Language Result Execution time Memory
739514 2023-05-10T14:46:34 Z Kirill22 Nicelines (RMI20_nicelines) C++17
Compilation error
0 ms 0 KB
#include "nice lines.h"
#include "bits/stdc++.h"

using namespace std;

long double query(long double x, long double y);
void the_lines_are(std::vector<int> a, std::vector<int> b);

void solve(int subtask_id, int N) {
    int x = (1 << 16);
    vector<int> res;
    function<void(int, int)> solve = [&] (int l, int r) {
        int m = (l + r) / 2;
        if (abs(query(x, m) * 2 - query(x, l) - query(x, r)) < 1e-6) {
            return;
        }
        if (r - l == 2) {
            res.push_back(m);
            return;
        }
        solve(l, m);
        solve(m, r);
    };
    solve(-x, x);
    vector<int> a, b;
    for (int i = 0; i < N; i++) {
        int y = res[i] % x;
        if (y >= x / 2) {
            y -= x;
        }
        b.push_back(y);
        a.push_back((res[i] - y) / x);
    }
    the_lines_are(a, b);
}

Compilation message

nicelines.cpp:1:10: fatal error: nice lines.h: No such file or directory
    1 | #include "nice lines.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.