Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use warnings;
- use 5.12.4;
- chomp(my $n = <STDIN>);
- chomp(my @line = <STDIN>);
- my $result = 0;
- for my $now_point (@line){
- for my $target_point (@line){
- my @now_point = split / /, $now_point;
- my @target_point = split / /, $target_point;
- my $x = abs ($now_point[0] - $target_point[0]);
- my $y = abs ($now_point[1] - $target_point[1]);
- my $route = sqrt ($x*$x + $y*$y);
- if( $result < $route ){
- $result = $route;
- }
- }
- }
- print $result,"\n";
Add Comment
Please, Sign In to add comment