变量名称
变量(盛饭的碗,一个有名字的碗,一个空的碗,可以盛上饭,可以盛不同的饭,就是赋值不同的数值)
int a;
a = 5;
int b = 2;
int c, d, e, f;
// n个数
int n;
// 一个数
int n;
int x;
// 两个数
int a, b;
int x, y;
// 求和
int sum;
// 计数
int cnt;
// 写循环, i, j, k
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
for (int k = 0; k < p; k++)
// 如果有更多层的循环,i1, i2, i3, i4
// 开数组
const int N = 110;
int a[N];
const int N = 1e5 + 10;
int a[N];
// n行,m列的矩阵
int n, m;
// 坐标
int x, y;
// 和生活中的一些事物,有关联
// 钱,时间,距离
int money, int tim, int dis
int d;
// 临时变量,存一些中间信息
int temp;
int t;
// 有n组数据
int T;
while (T--){
}
// 奥义
// 英文单词简写(缩写)
标准数据类型
// 以下几个单词,要记笔记
int, 整型,用来存整数
double, 双精度浮点型,用来存小数/实数
char, 字符类型,用来存字符
bool, 布尔类型,用来存true/false
long long, 长整型,用来存爆int的数,1e18这个量级的
string, string类,用来存字符串的
// 其他不常用的:
short, 短整型
float, 单精度浮点数