关于#include<bits/stdc++.h>

2023-05-16

偶然发现

#include<bits/stdc++.h>

包括了C++几乎所有的头文件,感觉以后可以返璞归真了。
回顾自己不长的竞赛历程,代码风格从

#include<stdio.h>
int main()
{
    printf("hello world!\n");
    return 0;
}

#include<cstdio>
#include<cstding>
#include<algorithm>
#include<cmath>
using namespace std;
int main()
{
    printf("hello world!\n");
    return 0;
}

再到

#include<bits/stdc++.h>
using namespace std;
int main()
{
    printf("hello world!\n");
    return 0;
}

从简到繁,再由繁到简。似乎很有哲理的样子。
然而。。。
好像部分评测系统任不认这种写法。。。

顺便附上源码

// C++ includes used for precompiling -*- C++ -*-

// Copyright (C) 2003-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/** @file stdc++.h
 *  This is an implementation file for a precompiled header.
 */

// 17.4.1.2 Headers

// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

让我看到你们的双手

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

关于#include<bits/stdc++.h> 的相关文章

随机推荐

  • freertos入门之创建Task

    基于esp32平台 span class token macro property span class token directive hash span span class token directive keyword includ
  • freertos入门之queue

    基于esp32 平台 参考 xff1a https www freertos org fr content src uploads 2018 07 161204 Mastering the FreeRTOS Real Time Kernel
  • freertos入门之binary semaphore

    基于esp32 平台 参考 xff1a https www freertos org fr content src uploads 2018 07 161204 Mastering the FreeRTOS Real Time Kernel
  • freertos入门之EventGroup

    span class token macro property span class token directive hash span span class token directive keyword include span spa
  • freertos入门之Timer

    span class token macro property span class token directive hash span span class token directive keyword include span spa
  • freertos入门之StreamBuffer

    span class token macro property span class token directive hash span span class token directive keyword include span spa
  • 设置cpp-httplib 服务器模式模式下的线程池大小 以及如何增加默认处理函数 以便能够实现http请求转发

    先说说默认的创建的线程池数量 原因是某天调试在gdb调试下 一启动程序发现 开启了好多线程 如下图 因为我们程序 没几个线程 数了下 居然有60多个线程 不需要那么多 所以看下 httplib的源码 构造函数的时候 设置了最大线程池数量 看
  • freertos入门之StreamBuffer

    span class token macro property span class token directive hash span span class token directive keyword include span spa
  • arduino-esp32 入门之wifi连接热点

    参考 xff1a https github com espressif arduino esp32 blob master libraries WiFi examples WiFiClient WiFiClient ino span cla
  • esp32-arduino入门之点亮led

    参考 xff1a https learncplusplus org how to program arduino with c span class token macro property span class token directi
  • stm32 学习资料汇总

    外设库以及example xff1a Google 搜索 STM32 Standard Peripheral Libraries
  • HttpClient学习研究---第四章:HTTP authenticationHTTP身份验证

    第四章 HTTP authentication HTTP身份验证 HttpClient provides full support for authentication schemes defined by the HTTP standar
  • Linux系统下常用的3个网络测试工具!

    在Linux系统中 xff0c 有很多用于管理和监测网络连接的命令 xff0c 其中ping traceroute和nslookup是比较常用的网络命令 xff0c 可以用来测试网络 诊断网络故障等等 xff0c 以下是详细的内容 xff1
  • TCP.02.SELECT模型

    文章目录 SELECT模型简介SELECT模型流程SELECT原理SELECT代码实现fd set 数组及基本操作SELECT函数参数2 xff08 重点 xff09 参数3参数4 关闭所有SOCKET句柄处理控制台窗口关闭事件整体代码思考
  • Node.js http 模块详解:request 对象

    前言 前文介绍了 http 模块的基本用法 xff0c 主要就是调用 createServer 和 listen 方法来创建和启动服务 要处理具体的 HTTP 请求 xff0c 就要在 createServer 方法中写点什么 本文来介绍处
  • 如何确认串口波特率

    文章目录 1 盲扫一遍2 示波器测量1bit时间3 逻辑分析仪确认 背景 xff1a 手上有一个模块使用串口通信但是不知道其波特率 xff0c 如何确认它的波特率呢 xff1f 1 盲扫一遍 波特率有常用的配置9600 115200 230
  • curl命令常用参数

    curl命令常用参数 curl简介常用方法将远程文件下载到本地 o并指定名称指定请求方式 X显示响应结果 v携带用户名 密码 u携带请求头 H查看服务端响应头 i只显示http response的头信息 I自动跳转 L模拟dns解析 res
  • 学习ZLmediaKit流媒体服务器时候遇到的问题

    照zlmediakit的源码 自己复制了一份 然后有的地方编译不过修改了部分 测试的时候发现有两个问题 第一是 ffmpeg的ffplay 能播放 vlc不能播放 第二个问题是directProxy设置为0的时候 推流的时候 然后用ffpl
  • 如何在C/C++中使用pi (π) 值

    在math h有一个宏定义M PI if defined USE MATH DEFINES amp amp defined MATH DEFINES DEFINED define MATH DEFINES DEFINED Definitio
  • 关于#include<bits/stdc++.h>

    偶然发现 span class hljs preprocessor include lt bits stdc 43 43 h gt span 包括了C 43 43 几乎所有的头文件 xff0c 感觉以后可以返璞归真了 回顾自己不长的竞赛历程