Submission #19513987


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;

const double pi=3.14159265359;

int main(){
  double A,B,H,M;cin>>A>>B>>H>>M;
  double theta=M*5.5-H*30;
  theta=abs(theta);
  if(theta>180) theta=360-theta;
  cout<<fixed<<setprecision(12)<<sqrt(A*A+B*B-2*A*B*cos(theta*pi/180))<<endl;
}

Submission Info

Submission Time
Task C - : (Colon)
User what_a_mess
Language C++ (GCC 9.2.1)
Score 300
Code Size 294 Byte
Status AC
Exec Time 6 ms
Memory 4124 KB

Judge Result

Set Name Sample Subtask1
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 30
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
Subtask1 sample_01.txt, sample_02.txt, sub1_01.txt, sub1_02.txt, sub1_03.txt, sub1_04.txt, sub1_05.txt, sub1_06.txt, sub1_07.txt, sub1_08.txt, sub1_09.txt, sub1_10.txt, sub1_11.txt, sub1_12.txt, sub1_13.txt, sub1_14.txt, sub1_15.txt, sub1_16.txt, sub1_17.txt, sub1_18.txt, sub1_19.txt, sub1_20.txt, sub1_21.txt, sub1_22.txt, sub1_23.txt, sub1_24.txt, sub1_25.txt, sub1_26.txt, sub1_27.txt, sub1_28.txt
Case Name Status Exec Time Memory
sample_01.txt AC 6 ms 4060 KB
sample_02.txt AC 2 ms 3920 KB
sub1_01.txt AC 2 ms 4020 KB
sub1_02.txt AC 2 ms 3900 KB
sub1_03.txt AC 2 ms 4052 KB
sub1_04.txt AC 2 ms 3972 KB
sub1_05.txt AC 3 ms 3928 KB
sub1_06.txt AC 2 ms 3740 KB
sub1_07.txt AC 2 ms 3912 KB
sub1_08.txt AC 2 ms 4096 KB
sub1_09.txt AC 2 ms 3868 KB
sub1_10.txt AC 2 ms 4000 KB
sub1_11.txt AC 2 ms 3972 KB
sub1_12.txt AC 2 ms 3960 KB
sub1_13.txt AC 2 ms 4124 KB
sub1_14.txt AC 2 ms 3892 KB
sub1_15.txt AC 4 ms 3844 KB
sub1_16.txt AC 3 ms 3972 KB
sub1_17.txt AC 2 ms 3932 KB
sub1_18.txt AC 2 ms 3920 KB
sub1_19.txt AC 2 ms 3972 KB
sub1_20.txt AC 2 ms 4036 KB
sub1_21.txt AC 2 ms 4024 KB
sub1_22.txt AC 2 ms 3732 KB
sub1_23.txt AC 3 ms 3912 KB
sub1_24.txt AC 1 ms 3992 KB
sub1_25.txt AC 2 ms 3892 KB
sub1_26.txt AC 2 ms 4024 KB
sub1_27.txt AC 2 ms 4012 KB
sub1_28.txt AC 2 ms 4068 KB