基本算法——包罗万象

1.输入输出

scanf、printf:速度快,需要记忆不同数据类型的格式化字符串
cin、cout:简单,在某些情况下较慢
getchar:读入一个字符
puts/gets:输出/输入一个字符串

freopen:重定向

<iostream>:cin,cout
<cstdio>:scanf,printf
using namespace std;

非常恐怖!!!

原文地址:https://www.cnblogs.com/ZDHYXZ/p/8428224.html