This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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);
long double w = query(0.000001, 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));
if(w < x) a = -a;
int a1 = (int)round(a);
int b1 = (int)round(-a*x/(x+y));
the_lines_are({a1}, {b1});
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |