数据生成器:

#include<bits/stdc++.h>
using namespace std;
#define ll long long
signed main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	srand(time(NULL));
	int n=300000;
	int k=299999,d=1;
	cout<<n<<" "<<k<<" "<<d<<'\n';
	while(n--){
		cout<<rand()<<" "<<rand()%1000+1<<'\n';
	}
	return 0;
}

能卡掉部分能过的 O(n2)O(n^2) 做法。

1 條評論

  • 1

資訊

ID
929
時間
1000ms
記憶體
256MiB
難度
6
标签
(無)
遞交數
52
已通過
18
上傳者