正确复杂度应为 O(n)O(n)O(n),但暴力也能过。提交记录
使用此勾使构造数据可以卡爆。
#include<bits/stdc++.h> using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); freopen("hack.in","w",stdout); cout<<"2000000 10000 10\n"; for(int i=1;i<=2000000;++i) cout<<"0 11\n"; return 0; }