提供 hack 生成器
查看原帖
提供 hack 生成器
1125291
ZMQ_Ink6556楼主2024/10/18 08:48

不针对题解

大部分基于链表的做法会被此 hack 卡到 500ms+500ms+(本地),优化不够则会 TLE,请求管理员添加。

生成器:

#include<bits/stdc++.h>
using namespace std;
int n = 200000 , cnt;
int main()
{
	freopen("data.in" , "w" , stdout);
	srand(time(0));
	cout << n << '\n';
	while(cnt <= n)
	{
		while(rand() % 330 != 0)
		{
			cnt++;
			if(cnt > n)
			{
				break;
			}
			cout << "1 ";
		}
		while(rand() % 8 != 0)
		{
			cnt++;
			if(cnt > n)
			{
				break;
			}
			cout << "0 ";
		}
	}
	return 0;
}
2024/10/18 08:48
加载中...