2010-10-26 12:25:27 -06:00
|
|
|
#! /usr/bin/awk -f
|
|
|
|
|
|
|
|
BEGIN {
|
|
|
|
FS = "\t";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2010-10-26 14:57:17 -06:00
|
|
|
tanks[$1] = $2;
|
2010-10-26 12:25:27 -06:00
|
|
|
if ($4 == "(nil)") {
|
|
|
|
p = $1;
|
|
|
|
} else {
|
|
|
|
p = $4;
|
|
|
|
}
|
|
|
|
score[p] += 1;
|
2011-02-12 20:31:54 -07:00
|
|
|
if (score[p] == topscore) {
|
|
|
|
winners += 1;
|
|
|
|
} else if (score[p] > topscore) {
|
|
|
|
winners = 1;
|
2010-10-26 12:25:27 -06:00
|
|
|
topscore = score[p];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
2011-02-12 20:31:54 -07:00
|
|
|
if (winners > 1) {
|
|
|
|
exit;
|
|
|
|
}
|
2010-10-26 12:25:27 -06:00
|
|
|
for (id in tanks) {
|
|
|
|
if (score[id] == topscore) {
|
2010-10-26 14:57:17 -06:00
|
|
|
print tanks[id];
|
2010-10-26 12:25:27 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|