当前位置:网站首页>读入、输出优化
读入、输出优化
2022-08-02 07:20:00 【*﹏ℳ๓无情*】
关闭同步
ios::sync_with_stdio(false), cin.tie(0);
//cin和cout 不能和其他的scanf,printf,puts,sscanf,sprintf,getchar等混用
整形
读入
template <typename T> inline T read()
{
T sum = 0, fl = 1;
int ch = getchar();
for (; !isdigit(ch); ch = getchar())
if (ch == '-')
fl = -1;
for (; isdigit(ch); ch = getchar())
sum = sum * 10 + ch - '0';
return sum * fl;
}
//a=read<int>();
输出
template <typename T> inline void write(T x)
{
if (x < 0)
putchar('-'), x *= -1;
if (x > 9)
write(x / 10);
putchar(x % 10 | '0');
}
//write(a);
边栏推荐
- Introduction to Totem Pole and Push-Pull Circuits
- HCIP 第十二天
- flutter 参数传一个范型数据
- spark architecture
- Transimpedance amplifier
- Data Middle Office: Started in Ali, Prosperous in DaaS
- Probability Theory and Mathematical Statistics
- Mysql error 2003 solution Can 't connect to Mysql server on' localhost '(10061).
- HCIP第三天
- FormData upload binary file, object, object array
猜你喜欢
随机推荐
Splunk Filed extraction field interception
Understand Chisel language. 31. Chisel advanced communication state machine (3) - Ready-Valid interface: definition, timing and implementation in Chisel
HCIP 第十一天
gdalinfo: error while loading shared libraries: libgdal.so.30: cannot open shared object file: No su
Splunk Filed extraction 字段截取
MySQL批量更新
From cloud computing to function computing
初探形式化方法基本原理
postgres groupby merge strings
Metasploit(MSF)基础超级详细版
Data Middle Office: Started in Ali, Prosperous in DaaS
Thesis understanding: "Cross-Scale Residual Network: A GeneralFramework for Image Super-Resolution, Denoising, and "
(2022 Nioke Duo School 5) C-Bit Transmission (Thinking)
Splunk Field Caculated Calculated Field
Install Metasploitable2 on VMware
MySQL-Multiversion Concurrency Control
FormData上传二进制文件、对象、对象数组
Find the largest n files
MySQL - based
关于DDoS的几个误区







![[Unity3D] Beginner Encryption Skills (Anti-Cracking)](/img/07/4a0731dd66b058c07d6240ffd36eea.png)

