Pagini recente » Cod sursa (job #2404894) | Cod sursa (job #2617857) | Cod sursa (job #2142663) | Cod sursa (job #533675) | Cod sursa (job #2066404)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("adapost2.in");
ofstream fout("adapost2.out");
const int Nmax = 5e4 + 10;
struct punct {
double x;
double y;
}puncte[Nmax];
double dist_a_la_b(punct a, punct b)
{
return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
int main()
{
int n;
fin >> n;
for(int i = 1; i <= n; ++i) {
double x, y;
fin >> x >> y;
puncte[i].x = x * 1000;
puncte[i].y = y * 1000;
}
punct centr_greutate;
int sum_x = 0;
int sum_y = 0;
for(int i = 1; i <= n; ++i) {
sum_x += puncte[i].x;
sum_y += puncte[i].y;
}
centr_greutate.x = sum_x / n;
centr_greutate.y = sum_y / n;
int pas = 100;
while(pas != 1) {
long long dist1;
long long dist2;
long long dist3;
long long dist4;
}
return 0;
}