网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  fread优化读入

fread优化读入

分类: IT文章 • 2022-05-18 14:14:45
inline char nc()
{
    static const int BS = 1 << 22;
    static unsigned char buf[BS],*st,*ed;
    if(st == ed) ed = buf + fread(st=buf,1,BS,stdin);
    return st == ed ? EOF : *st++;
}
//#define nc getchar
inline int read()
{
    char ch;
    int res = 0; bool flag = 0;
    while (!isdigit(ch = nc()));
    while (ch >= '0' and ch <= '9')
    {
        res = (res << 1) + (res << 3) + (ch - '0');
        ch = nc();
    }
    return res;
}

卡常

相关推荐

  • MySQL如何定位并优化慢查询sql 1.如何定位并优化慢查询sql   2.联合索引的最左匹配原则的成因 3.索引是建立得越多越好吗
  • [转载]前端优化指南
  • 如何优化增强第三方库?
  • Machine Learning 18 模型优化----算法调参
  • mysql1.7(mysql优化,mysql-mmm软件介绍,mysql高可用集群。)
  • iOS性能优化技术
  • 编译器优化技术-公共子表达式消除和数组边界检查消除
  • 百度地图加载海量标注性能优化策略 Canvas API方案
  • 选择排序优化
  • 前端开发--首页优化
  • 斜率优化 一.玩具装箱 二.特别行动队 三.仓库建设
  • 用PS与AI制作手绘风格的涂鸦艺术字教程
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号