笔记(持续修改)

ios::sync_with_stdio(false);

iostream默认与stdio关联在一起的,以使两者同步,因此消耗了iostream不少性能,设置为false后,不再同步了,iostream的性能提高了很多倍。关闭后,cin不能和scanf,sscanf, getchar, fgets之类同时用了,否则就可能会导致输出和预期的不一样。

reverse(s.begin(), s.end());

vector<int>(S).swap(S);

#include <cstring>;
meset(s,0,sizeof(s));

原文地址:https://www.cnblogs.com/tanjiaqi/p/7535088.html