跳到正文

学习·文化课

警示后人

zhonghongyi_约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年3月29日
篇幅
约 1 分钟

版本

  1. v2当前
  2. v1

事情要从前天打的一场模拟赛说起。。。

以下是我的赛时代码

C++
#include<bits/stdc++.h>	//喜欢用万能头
using namespace std;//命名空间
//36行的定义与函数
int main(){
	freopen("jump.in","r",stdin);
	freopen("jump.out","w",stdout);	//freopen打开文件
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);//关闭同步流
	//代码ing
	fclose(stdin);
	fclose(stdout);	//关闭文件指针
	return 0;
}

第二天发现爆0了!

一问才知道同步流与fclose冲突

所以好习惯很致命

今天月考了,考得不太好,才200多名,语文拉分拉爆了。

下次努力吧!

预祝大家AK CSP-J和CSP-S

原文