Hack
查看原帖
Hack
90693
_•́へ•́╬_奶龙!楼主2022/10/30 23:07

迟了一点,CF上uphacking的一周结束了,发在这里:

  1. hash烂的已经叉了,包括但不限于不加东西的unorderedgp_hash_table
  2. O(nnlog2n)\mathcal O(n\sqrt n\log^2n) 的已经叉了
  3. O(nnlogn)\mathcal O(n\sqrt n\log n) 并且常数大的已经叉了(大概就是hash函数常数大)

以上生成器可以在这里找到

#include<stdio.h>
#include<set>
#define int long long
#define N 972777519512027136ll
using namespace std;
set<int>s,t,q;
main()
{
	q.emplace(N);
	for(int i;s.size()+t.size()<150000;)
	{
		i=*--q.end();q.erase(--q.end());
		for(;q.size()>150000;q.erase(q.begin()));
		t.emplace(i);
		for(int j=i;j<=N&&s.size()+t.size()<150000;j+=i)
			s.emplace(j);
		if(!(i&1))q.emplace(i/2);
		if(!(i%3))q.emplace(i/3);
	}
	printf("200000\n");
	for(set<int>::iterator it=s.begin();it!=s.end();++it)
		printf("+ %lld\n",*it);
	for(set<int>::iterator it=t.begin();it!=t.end();++it)
		printf("? %lld\n",*it);
	for(int i=25000;i--;)printf("- %lld\n+ %lld\n",N,N);
}
2022/10/30 23:07
加载中...