thanks to and for the i/o part.
thanks to for the rounding part.s=s/nkilo+0.5; //s=round(s/nkilo);
check return value of scanf, std::fgets, std::atoi, std::atol, std::atoll, std::strtof, std::strtod, std::strtold, std::strtol, std::strtoll, std::strtok, std::round, std::lround, std::llround, #include#include #include #define MAXLEN 200#define STEP 8char buffer[MAXLEN];int main() { //freopen("input.txt","r",stdin); int nsect, team, h,m,s, ht,mt,st, i, disqualified; char *p; double nkilo; scanf("%d%lf",&nsect,&nkilo); while(scanf("%d",&team)==1) { h=m=s=0; disqualified=0; p=buffer; fgets(buffer,MAXLEN,stdin); for(i=0;i
as the problem title of hdu 1036 ( Average is not Fast Enough! )
suggest, Average is not Fast Enough, indeed.版权声明:本文为博主原创文章,未经博主允许不得转载。// p.s. If in any way improment can be achieved, better performance or whatever, it will be well-appreciated to let me know, thanks in advance.