• + 1 comment

    cout << setprecision(1) << fixed << t << endl;

    Either use std:: for all commands or for none. This will be better.