摘要: code #include<iostream> #include<vector> #include<cstring> #include<algorithm> using namespace std; int N, P; const int maxn = 310; bool isRemoved[max 阅读全文
posted @ 2022-02-16 11:56 ethon-wang 阅读(34) 评论(0) 推荐(0) 编辑
摘要: tie是将两个stream绑定的函数,空参数的话返回当前的输出流指针。 std :: cin默认是与std :: cout绑定的,所以每次操作的时候都要调用fflush,这样增加了IO的负担,通过tie(nullptr)来解除std :: cin和std :: cout之间的绑定,进一步加快执行效率 阅读全文
posted @ 2022-02-16 11:16 ethon-wang 阅读(624) 评论(0) 推荐(0) 编辑
摘要: code #include<algorithm> #include<iostream> using namespace std; void iswap(int a[],int x,int y){ if(a[x]==a[y]){ return; }else{ swap(a[x],a[y]); } } 阅读全文
posted @ 2022-02-16 10:02 ethon-wang 阅读(27) 评论(0) 推荐(0) 编辑