Submission #2150635
Source Code Expand
#include<bits/stdc++.h> using namespace std; using Int = long long; //INSERT ABOVE HERE double ask(double t){ double y; printf("? %.12f\n", t); fflush(stdout); scanf("%lf", &y); return t; } void ans(double h,double v,double g){ printf("! %.12f %.12f %.12f\n", h, v, g); fflush(stdout); exit(0); } signed main(){ double h=ask(0); double y1=(ask(1)-h)*2; double y2=ask(2)-h; double g=y1-y2; double v=(y1+g)/sqrt(2); ans(h,v,g); return 0; }