Submission #943392

# Submission time Handle Problem Language Result Execution time Memory
943392 2024-03-11T12:51:03 Z abcvuitunggio Nicelines (RMI20_nicelines) C++17
0 / 100
32 ms 940 KB
#include "nice_lines.h"
#include <bits/stdc++.h>
#define ld long double
using namespace std;
const int x=1e5;
const ld eps=1e-9;
vector <int> a,b;
void dnc(ld l, ld r, ld lo, ld hi){
    ld mid=(l+r)/2,m=query(x,mid);
    if (abs((lo+hi)/2-m)<eps)
        return;
    if (ceil(l)==floor(r)){
        int y=floor(r);
        //y=ax+b;
        int B=y%x;
        if (B>=10000)
            B-=x;
        int A=(y-B)/x;
        a.push_back(A);
        b.push_back(B);
        return;
    }
    dnc(l,mid,lo,m);
    dnc(mid,r,m,hi);
}
void solve(int subtask_id, int N){
    dnc(-1e10,1e10,query(x,-1e10),query(x,1e10));
    the_lines_are(a,b);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 448 KB Output is correct
2 Correct 1 ms 444 KB Output is correct
3 Incorrect 1 ms 436 KB Incorrect
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 448 KB Output is correct
2 Incorrect 1 ms 440 KB Incorrect
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 448 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 32 ms 444 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 13 ms 940 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 32 ms 444 KB Incorrect
2 Halted 0 ms 0 KB -