Created
June 16, 2012 13:44
-
-
Save meru-akimbo/2941361 to your computer and use it in GitHub Desktop.
AtCoder Regular Contest #004 A
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment