algorithm.txt: Updated the algorithm with a small bug fix
necklace.cpp: Updated the code to match the algorithmic changes
necklace.h: Updated the code to match the algorithmic changes
necklace.cpp: minor bug fix
All 3 files collated into one, required for submission to thew USACO website.