#include

#include

#include

#include // _1

#include // bind()

#include

namespace {

typedef double coord_t;

typedef boost::tuple point_t;

coord_t distance_sq(const point_t& a, const point_t& b) { // or boost::geometry::distance

coord_t x = a.get() - b.get();

coord_t y = a.get() - b.get();

coord_t z = a.get() - b.get();

return x*x + y*y + z*z;

}

}

int main() {

using namespace std;

using namespace boost::lambda; // _1, _2, bind()

// read array from stdin

vector points;

cin.exceptions(ios::badbit); // throw exception on bad input

while(cin) {

coord_t x,y,z,u,v,w;

cin >> x >> y >> z >> u >> v >> w;

points.push_back(boost::make_tuple(x,y,z,u,v,w));

}

point_t point(3.5, -9e-2, 4);//3.59E+00 -9.62E-02 4.26E+00

cout

Similar questions and discussions