답안 #943446

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
943446 2024-03-11T13:21:19 Z abcvuitunggio Nicelines (RMI20_nicelines) C++17
83.9866 / 100
44 ms 856 KB
#include "nice_lines.h"
#include <bits/stdc++.h>
#define ld long double
#define int long long
using namespace std;
const int x=1e5;
const ld eps=1e-9;
vector <int32_t> 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 (r-l<1){
        int y=floor(r);
        int B=(y%x+x)%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(int32_t subtask_id, int32_t N){
    dnc(-2e9,2e9+1e-6,query(x,-2e9),query(x,2e9+1e-6));
    the_lines_are(a,b);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 436 KB Output is correct
2 Correct 1 ms 436 KB Output is correct
3 Correct 1 ms 436 KB Output is correct
4 Correct 1 ms 436 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 436 KB Output is correct
2 Correct 2 ms 436 KB Output is correct
3 Correct 1 ms 440 KB Output is correct
4 Correct 1 ms 688 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 448 KB Output is correct
2 Correct 1 ms 432 KB Output is correct
3 Correct 2 ms 436 KB Output is correct
4 Correct 2 ms 436 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 38 ms 432 KB Output is partially correct
2 Partially correct 32 ms 856 KB Output is partially correct
3 Partially correct 31 ms 688 KB Output is partially correct
4 Partially correct 30 ms 440 KB Output is partially correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 11 ms 436 KB Output is partially correct
2 Partially correct 11 ms 432 KB Output is partially correct
3 Partially correct 14 ms 436 KB Output is partially correct
4 Partially correct 12 ms 432 KB Output is partially correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 38 ms 432 KB Output is partially correct
2 Partially correct 32 ms 856 KB Output is partially correct
3 Partially correct 31 ms 688 KB Output is partially correct
4 Partially correct 30 ms 440 KB Output is partially correct
5 Partially correct 11 ms 436 KB Output is partially correct
6 Partially correct 11 ms 432 KB Output is partially correct
7 Partially correct 14 ms 436 KB Output is partially correct
8 Partially correct 12 ms 432 KB Output is partially correct
9 Partially correct 34 ms 668 KB Output is partially correct
10 Partially correct 42 ms 600 KB Output is partially correct
11 Partially correct 44 ms 436 KB Output is partially correct
12 Partially correct 37 ms 436 KB Output is partially correct