Submission #8155292


Source Code Expand

Copy
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int>P;

const int INF=0x3f3f3f3f;
const ll INFL=0x3f3f3f3f3f3f3f3f;
const int MOD=1000000007;

int main(){
	double a,b,x;cin>>a>>b>>x;
	double h=x/(a*a);
	if(h*2<=b){
		double A=h*a*2/b;
		printf("%.12lf\n",atan2(b,A)/M_PI*180);
	}
	else{
		double A=h*2-b;
		printf("%.12lf\n",atan2(b-A,a)/M_PI*180);
	}
}

Submission Info

Submission Time
Task D - Water Bottle
User autumn_eel
Language C++14 (GCC 5.4.1)
Score 400
Code Size 450 Byte
Status
Exec Time 3 ms
Memory 512 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample00, sample01, sample02
All 400 / 400 handmade03, handmade04, random05, random06, random07, random08, random09, random10, random11, random12, random13, random14, sample00, sample01, sample02
Case Name Status Exec Time Memory
handmade03 2 ms 256 KB
handmade04 2 ms 256 KB
random05 1 ms 256 KB
random06 1 ms 256 KB
random07 1 ms 256 KB
random08 1 ms 256 KB
random09 1 ms 256 KB
random10 1 ms 256 KB
random11 1 ms 256 KB
random12 1 ms 256 KB
random13 1 ms 256 KB
random14 1 ms 256 KB
sample00 1 ms 256 KB
sample01 1 ms 256 KB
sample02 3 ms 512 KB