A challenge by my friend to find the maximum contiguous product of numbers in an array in the fastest way possible. This solution uses a sliding window without any other optimizations...so, nothing fancy here
$ g++ genrand.cpp -o genrand && ./genrand 100 2000 > rand.txt
$ g++ process.cpp -o process && ./process rand.txt 5
record broken 0 2906
record broken 2906 3301
record broken 3301 3514
record broken 3514 4317
record broken 4317 4702
record broken 4702 4793
record broken 4793 5542
record broken 5542 6277
record broken 6277 7160
record broken 7160 7345