제출 #742982

#제출 시각아이디문제언어결과실행 시간메모리
742982jamezzzNicelines (RMI20_nicelines)C++17
11 / 100
1 ms304 KiB
#include <bits/stdc++.h> using namespace std; #include "nice_lines.h" #define maxn 10000 #define EPS 1e-3 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); ld inv=1/(x2-x1); int a=(int)(pow(inv*inv-1,0.5)+EPS); int b=(int)(10001-x2*pow(a*a+1,0.5)+EPS); if(abs(dist(a,b,1,10001)-query(1,10001))>EPS)a=-a; the_lines_are({a},{b}); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...