2023年3月26日
摘要: 积性函数 f(ab)=f(a)*f(b) 链接:https://ac.nowcoder.com/acm/contest/53485/I #include<iostream> #include<algorithm> using namespace std; typedef long long ll; 阅读全文
posted @ 2023-03-26 14:04 rain_wind_read 阅读(19) 评论(0) 推荐(0)
摘要: ###c++全排列 next_prenumation(a.begin(),a.end()) nextprenumation()就是该数组的下一个字典序大的排列,(更换最后一个逆序对) #include<iostream> #include<algorithm> #include<vector> #i 阅读全文
posted @ 2023-03-26 14:01 rain_wind_read 阅读(23) 评论(0) 推荐(0)
摘要: 牛客 最小异或对 求数组集合内的最小异或对 结论: 一个集合内的最小异或对,一定是排序后的两个向量相邻元素。秩序记录其相邻元素的异或值即可。 一个set存储元素值,另一个元素存储异或值。 增加元素时,删除该元素前驱和后继异或,增加上该元素和前驱后继的异或 //#include<bits/srdc++ 阅读全文
posted @ 2023-03-26 13:58 rain_wind_read 阅读(161) 评论(0) 推荐(0)