Skip to content

Instantly share code, notes, and snippets.

@meru-akimbo
Created June 16, 2012 13:44
Show Gist options
  • Save meru-akimbo/2941361 to your computer and use it in GitHub Desktop.
Save meru-akimbo/2941361 to your computer and use it in GitHub Desktop.
AtCoder Regular Contest #004 A
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