We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1.排序可直接使用头文件#include<algorithm>中的各种函数,例如max,min,swap,reverse,sort等函数。
2.如果全用的是cin,cout的输入输出,可能会导致超时,这时候选用其它的输入输出方式可能可以解决超时问题,否则则是算法时间复杂度不合要求,需要优化.
3.如果需要使用不同类型的映射,数组操作不大方便,可以使用map容器。
#include<map> using namespace std; //map的定义(名为table) map<string,int>table;