BSGS算法是meet in the middle思想的一种应用,参考Yveh的博客我学会了BSGS的模版和hash表模板,,, 现在才会hash是不是太弱了,,, #include<cmath> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; struct node{ static const int mo=100007; int a[100010],v…
进来Bear正在学习巩固并行的基础知识,所以写下这篇基础的有关并行算法的文章. 在讲述两个算法之前,需要明确一些概念性的问题, Race Condition(竞争条件),Situations like this, where two or more processes are reading or writing some shared data and the final result depends on who runs precisely when, are called…