Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < lines_n; i++) {
- cin >> x1 >> y1 >> x2 >> y2;
- distance = sqrt(pow(y1 - y2, 2) + pow(x1 - x2, 2));
- if (distance - max_distance > 0) {
- max_distance = distance;
- max_distance_n = 1;
- } else if (distance == max_distance || abs(distance - max_distance) / (abs(distance) + abs(max_distance)) < EPS) {
- max_distance_n++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement