叔叔传你过去 指针动态分配内存: 数组分配内存: 所以还是用数组嘛,虽然有点抽象,但简单易操作,而且代码短 #include<bits/stdc++.h> typedef long long ll; using namespac