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;
}

Submission Info

Submission Time
Task C - パニクるな
User beet
Language C++14 (GCC 5.4.1)
Score 0
Code Size 487 Byte
Status IE