要
by liutianshuo @ 2020-10-20 20:49:29
```cpp
#include<cstdio>
```
或者
```cpp
#include<bits/stdc++.h>
```
by 传奇英雄 @ 2020-10-20 20:49:34
服了,我发个这显示我格式不合格要用代码框。。(我又不是发代码。。)
by 传奇英雄 @ 2020-10-20 20:50:19
@[缈邈](/user/369561)
要的,在主函数的第一行写上:
```
freopen("xx.in","r",stdin);
freopen("xx.out","w",stdout);
```
其中 `xx` 比赛时会给,就是输入输出文件(似乎是
by 冰糖鸽子 @ 2020-10-20 20:51:00
具体打开文件看题目要求,比如
```cpp
freopen("xxx.in","r",stdin);
freopen("xxx.out","w",stdout);
```
by 滑大稽 @ 2020-10-20 20:51:48
@[缈邈](/user/369561) 不打就爆零。
如果您说的是头文件的话,`freopen`函数位于 `stdio.h`,即,
```cpp
#include <cstdio>
```
如果您说是用`freopen`打开哪个文件的话,每道题都不一样,输入文件是 `题目英文名.in`,输出文件是 `题目英文名.out`。
by CGDGAD @ 2020-10-20 20:54:00
别忘了 `fclose`。
by CGDGAD @ 2020-10-20 20:54:25
还记得上次比赛后几题没打 ```#include<cstdio>``` 的血泪史
by FutureThx @ 2020-10-20 20:55:26
说实话我还是喜欢
```latex
#include<bits/stdc++.h>
```
by shenxinge @ 2020-10-20 21:01:19
我知道万能头文件,只想问一下格式,谢谢各位了
by ArktischeKatze @ 2020-10-20 21:40:38