Submission #750610

# Submission time Handle Problem Language Result Execution time Memory
750610 2023-05-29T23:56:43 Z doowey Nicelines (RMI20_nicelines) C++14
0 / 100
42 ms 292 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);
    ld mid = (lohs + rasists) * 0.5;
    ld mk = query(BIG, mid);
 
    if(abs((lk + rk) / 2.0 - mk) < 0.00001){
        return;
    }
  	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;
    }
    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 Correct 1 ms 208 KB Output is correct
2 Correct 1 ms 208 KB Output is correct
3 Incorrect 1 ms 208 KB Incorrect
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 208 KB Output is correct
2 Incorrect 2 ms 208 KB Incorrect
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 208 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 42 ms 292 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 208 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 42 ms 292 KB Incorrect
2 Halted 0 ms 0 KB -