前言:

   快读的方式很多,这个是我比较常用的。

模板:

#include<bits/stdc++.h>
using namespace std;
template<class t>inline void read( t &res){
	char c;t flag=1;
	while((c=getchar())<'0'||c>'9')if(c=='-')flag=-1;res=c-'0';
	while((c=getchar())>='0'&&c<='9')res=res*10+c-'0';res*=flag;	
}
int main(){
	int t;
	read(t);//提高输入效率,提高速度。
	cout<<t<<'\n';
	
	return 0;
}

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐