Sapreste dirmi dov'è il problema?
Nelle due righe corrette di seguito

for (i = 0; i < N; i++) {

fscanf(f, "%d", &vt[i]);