#include <stdio.h>
#include "nice_lines.h"
#include <bits/stdc++.h>
void solve(int subtask_id, int N) {
long double x = query(0, 0);
long double y = query(1, 0);
long double z = query(0.5, 0);
if(z <= x || z <= y) {
long double a = tan(asin(y-x));
if(x == y) {
the_lines_are({0}, {(int)round(x)});
} else {
int a1 = (int)round(a);
int b1 = (int)round(a*x/(y-x));
the_lines_are({a1}, {b1});
}
} else {
long double a = tan(asin(x+y));
int a1 = (int)round(a);
int b1 = (int)round(-a*x/(x+y));
the_lines_are({a1}, {b1});
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Output is correct |
2 |
Correct |
0 ms |
208 KB |
Output is correct |
3 |
Correct |
0 ms |
208 KB |
Output is correct |
4 |
Incorrect |
0 ms |
208 KB |
Incorrect |
5 |
Halted |
0 ms |
0 KB |
- |
# |
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 |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |