use makefile ou g++ -std=c++14 main.cpp -lpthread -o main.out Rode usando ./main.out < input