About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

শুক্রবার, ১৬ জানুয়ারী, ২০১৫

Codeforces Beta Round #93 (Div. 2 Problem A)

//MH RIYAD
//facebook.com/riadzz

#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<string>
#include<map>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<vector>
using namespace std;

class riyad
{
public:
double x;
double y;
};

double find_dis(double a, double b, double c, double d)
{
double res = sqrt(((a - c)*(a - c)) + ((b - d)*(b - d)));
return res;
}

int main()
{    

double n, k;
riyad ary[105];
while (~scanf("%lf %lf", &n, &k))
{
for (int i = 0; i < n; i++)
{
cin >> ary[i].x >> ary[i].y;
}
double sum = 0.0;
for (int i = 0; i < n-1; i++)
{
          sum= sum+ find_dis(ary[i].x, ary[i].y, ary[i+1].x, ary[i+1].y);

}
sum /= 50.0;
printf("%.9lf\n", sum*k);


}
// system("pause");
return 0;
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন