#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(((lk + rk) / 2.0 - mk) < 0.001){
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 + 0.5);
ld rasists = (BIG * BIG + 0.5);
fin(lohs, rasists, -1.0, -1.0);
the_lines_are(aaa, bbb);
}
# |
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 |
3 ms |
208 KB |
Incorrect |
2 |
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 |
44 ms |
292 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
14 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
44 ms |
292 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |