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 <bits/stdc++.h>
using namespace std;
#include "nice_lines.h"
#define maxn 10000
typedef long double ld;
#define dist(a,b,x,y) (ld)abs(y-a*x-b)/pow(1+a*a,0.5)
void solve(int subtask_id,int N){
ld x1=query(0,10000),x2=query(0,10001);
int a=(int)(pow(1/((x2-x1)*(x2-x1))-1,0.5)+1e-6);//+-a
int b=(int)(10001-x2*pow(a*a+1,0.5));
if(dist(a,b,1,b+1)!=query(1,b+1))a=-a;
the_lines_are({a},{b});
}
# | 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... |