当前位置:网站首页>读入、输出优化
读入、输出优化
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);
边栏推荐
- Splunk Field Caculated Calculated Field
- 理论问题与工程问题的差异在哪里?
- LeetCode brush questions (7)
- redis-advanced
- Metasploit (MSF) Basic Super Detailed Edition
- apt & apt-get commands
- OC-error prompt
- gdalinfo: error while loading shared libraries: libgdal.so.30: cannot open shared object file: No su
- Install Metasploitable2 on VMware
- OC-NSString
猜你喜欢

pnpm + workspace + changesets 构建你的 monorepo 工程

停止精神内耗 每日分享
![MySQL报错1055解决办法:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains](/img/aa/ab58ec47bb96df803dbc6a8ff6dde3.png)
MySQL报错1055解决办法:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains

2022-08-01 第四小组 修身课 学习笔记(every day)

Splunk Filed Alias field name

责任链模式(Chain Of Responsibility)

Agile, DevOps and Embedded Systems Testing

(2022 Niu Ke Duo School 5) D-Birds in the tree (tree DP)

Splunk Filed extraction 字段截取

WebForm DropDownList分别绑定年月
随机推荐
我与csdn
MySQL-FlinkCDC-Hudi enters the lake in real time
替换ptmalloc,使用tcmalloc和jemalloc
HCIP 第十二天
Modify apt-get source to domestic mirror source
OC-NSSet(集合)
FormData上传二进制文件、对象、对象数组
LeetCode 2312. 卖木头块
postgres groupby 合并字符串
MySQL - based
Ask a question, my Flinkcdc has run through, I can monitor the binlog of msql, and I can also send kafk
spark 读取本地文件
LeetCode 2312. Sell Wood Blocks
静态路由综合实验
MySQL batch update
ROS文件系统以及相关命令
【Unity3D】初学加密技巧(反破解)
OC-NSDictionary
类型“DropDownList”的控件“ContentPlaceHolder1_ddlDepartment”必须放在具有 runat=server 的窗体标记内。
LeetCode 2360. The longest cycle in a graph