The program works correctly and it works quickly for small input files: tinyG.txt and tinyT.txt.
But for sample files: largeG.txt and largeT.txt (1000000 numbers in each), it takes an unacceptably long time.
Improvement
- Add a static rank function, brank to MStd that uses binary search.
- Modify the filter program to sort the vector v and use MStd::brank instead of MStd::lrank.