Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
/* Report the distance from src = ARGV[0] to dst = ARGV[1]
*/
BEG_G {
int dist[node_t];
node_t n, curn;
node_t src = node($G, ARGV[0]);
node_t dst = node($G, ARGV[1]);
$tvroot = src;
$tvtype = TV_bfs;
}
N {
curn = $;
if ($ == dst) {
printf ("dist from %s to %s is %d\n", src.name, dst.name, dist[dst]);
exit(0);
}
}
E {
if ($.head == curn) n = $.tail;
else n = $.head;
if (dist[n] == 0) dist[n] = dist[curn]+1;
}
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat