Signal Connection Codevita 9 Solution 2020

Signal Connection Codevita 9 Solution

Page Contents

C++ Code :

#include

using namespace std;

const int r=6371;
double Radian(double degree)
{
double pi = 3.14159265359;
return (degree * (pi / 180));
}

double findd1(double lt,double ld,double x,double y){
double a,c;
lt=Radian(lt);
ld=Radian(ld);
x=Radian(x);
y=Radian(y);
a= pow(sin((lt-x)/2),2)+cos(lt)*cos(x)*pow(sin((ld-y)/2),2);
c=2*atan2(pow(a,0.5),pow(1-a,0.5));
return r*c;
}

int main() {
int n;cin>>n;
int c=0;

double lt[n];
for(int i=0;i>lt[i];
}

double ld[n];
for(int i=0;i>ld[i];
}

int h[n];
for(int i=0;i>h[i];
}

double x,y;
cin>>x>>y;

for(int i=0;i=d1){
c=c+1;
}
}

cout<<c;

return 0;
}

Codevita Season 9 All Questions Solutions

Listed Here :

Leave a Comment

close
error: Content is protected !!