博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hdu 1036 (I/O routines, fgets, sscanf, %02d, rounding, atoi, strtol) ...
阅读量:6989 次
发布时间:2019-06-27

本文共 1059 字,大约阅读时间需要 3 分钟。

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.

转载于:https://www.cnblogs.com/qeatzy/p/4716229.html

你可能感兴趣的文章
mysql的sql文件的备份与还原
查看>>
Java API —— 泛型
查看>>
十三周进度报告
查看>>
「APIO2018」选圆圈
查看>>
单例模式的那些事
查看>>
Canvas - 时钟绘制
查看>>
linux-vsftp
查看>>
modelsim 中如何加载多个对比波形文件
查看>>
Linux内核抢占与中断返回【转】
查看>>
Linux 文件操作监控inotify功能及实现原理【转】
查看>>
linux arm的存储分布那些事之一
查看>>
Spring下redis的配置
查看>>
vs2010在进行数据架构比较时报'text lines should not be null'错误
查看>>
jeecg入门操作—表单界面
查看>>
网页音乐制作器(网页钢琴)-- MusicMaker
查看>>
oracle优化:避免全表扫描(高水位线)
查看>>
对超级课程表产品的一些个人小看法
查看>>
词频统计 效能分析
查看>>
Linux终极shell-zsh的完美配置方案!——oh-my-zsh
查看>>
MYSQL 函数、自定义函数 function
查看>>