foo.cpp: In function 'int cal()':
foo.cpp:13:31: error: 'ceil' was not declared in this scope
int needT1 = ceil(1.0*S / 60);
^
foo.cpp:43:38: error: 'ceil' was not declared in this scope
needT2 = ceil((ceil((S - s)*1.0 / 60) * 10 - m) / 4);
^
foo.cpp:43:53: error: 'ceil' was not declared in this scope
needT2 = ceil((ceil((S - s)*1.0 / 60) * 10 - m) / 4);
^
foo.cpp:43:53: error: redeclaration of '<typeprefixerror>ceil'
foo.cpp:43:38: note: previous declaration '<typeprefixerror>ceil'
needT2 = ceil((ceil((S - s)*1.0 / 60) * 10 - m) / 4);
^
foo.cpp:7:17: warning: unused variable 't' [-Wunused-variable]
int s = 0; int t = 0;
^
foo.cpp:8:6: warning: unused variable 'needT1' [-Wunused-variable]
int needT1;
^
foo.cpp:67:21: warning: unused variable 'doT3' [-Wunused-variable]
int maxT3, needT3, doT3;
^