Submission #750602

# Submission time Handle Problem Language Result Execution time Memory
750602 2023-05-29T21:16:58 Z doowey Nicelines (RMI20_nicelines) C++14
0 / 100
42 ms 312 KB
#include <bits/stdc++.h>
#include "nice_lines.h"

using namespace std;

typedef long double ld;
typedef pair<ld, ld> pdd;

#define fi first
#define se second
#define mp make_pair

const ld BIG = (ld)1e4 + 3;
const int big = (int)1e4 + 3;
vector<int> aaa, bbb;

void fin(ld lohs, ld rasists, ld lk, ld rk){
    if(lk < 0) lk = query(BIG, lohs);
    if(rk < 0) rk = query(BIG, rasists);
    if(rasists - lohs < 1.0){
        int vista = ceil(lohs);
        int B = vista % big;
        int A = (vista - B) / big;
        if(abs(A) > 1e4 || abs(B) > 1e4) return;
        aaa.push_back(A);
        bbb.push_back(B);
        return;
    }
    ld mid = (lohs + rasists) * 0.5;
    ld mk = query(BIG, mid);

    if(abs((lk + rk) / 2.0 - mk) < 0.00001){
        return;
    }
    fin(lohs, mid, lk, mk);
    fin(mid, rasists, mk, rk);
}

void solve(int subtask_id, int N) {
    /*
    printf("subtask_id = %d, N = %d\n", subtask_id, N);
    printf("query(0, 0) = %Lf\n", query(0, 0));
    printf("query(1, 1) = %Lf\n", query(1, 1));
    */
    ld lohs = -(BIG * BIG);
    ld rasists = (BIG * BIG);
    fin(lohs, rasists, -1.0, -1.0);
    the_lines_are(aaa, bbb);
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 312 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 304 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 42 ms 296 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 312 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 42 ms 296 KB Incorrect
2 Halted 0 ms 0 KB -