The challenge should be LOC total, including the LOC of the libraries used. That is the only possible way to compare apples to apples. Otherwise, what is to stop you from wrapping the entire solution into a "library" and just making a simple call-out to said library.
What is the total LOC of the implementation, period. Remove all ambiguity.