fork download
  1.  
  2. double maxDays(int remainw,int remaino,int costw,int costo){
  3. double time,e=1e-9;
  4. time=min((double)remainw/costw,(double)remaino/costo);
  5. double remw=remainw-time*costw;
  6. if(remw-0.0<e) return time;
  7. double timeadd=(double)remw/(2*costo+costw);
  8. return time+timeadd;
  9. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘double maxDays(int, int, int, int)’:
prog.cpp:4:56: error: ‘min’ was not declared in this scope
    time=min((double)remainw/costw,(double)remaino/costo);
                                                        ^
stdout
Standard output is empty