foo.cc: In function 'int main()':
foo.cc:15:5: error: 'scanf' was not declared in this scope
scanf("%d", &n);
^~~~~
foo.cc:30:30: error: 'min' was not declared in this scope
te[j][k]=min(te[j][k], te[j-girl[i].rmb][k-girl[i].rp]+girl[i].time);
^~~
foo.cc:30:30: note: suggested alternative: 'main'
te[j][k]=min(te[j][k], te[j-girl[i].rmb][k-girl[i].rp]+girl[i].time);
^~~
main
foo.cc:32:5: error: 'printf' was not declared in this scope
printf("%d\n", te[m][r]);
^~~~~~
foo.cc:32:5: note: suggested alternative: 'int'
printf("%d\n", te[m][r]);
^~~~~~
int