/in/foo.cc: In function 'int main()':
/in/foo.cc:13:20: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'char*' [-Wformat=]
scanf("%d\n",&T[i]);
~~~~~^
/in/foo.cc:16:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(T[i]='u')time+=t1+t3;
~~~~^~~~
/in/foo.cc:17:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
else if(T[i]='f')time+=2*t2;
~~~~^~~~
/in/foo.cc:18:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
else if(T[i]='d')time+=t1+t3;
~~~~^~~~
/in/foo.cc:8:29: warning: unused variable 'ans' [-Wunused-variable]
int M,a,t1,t2,t3,time=0,ans=0,tot=-1;
^~~