unsigned keylocks(unsigned keys[], unsigned nkeys, unsigned locks[], unsigned nlocks) { unsigned i, j; unsigned part1 = 0; for (i=0; i