经过 assert,我发现 max(n)≤32663,导致 O(nn) 的算法通过了,给出一组 hack 数据,这是 gen.cpp:
#include <iostream>
using namespace std;
int main() {
freopen("hack.in", "w", stdout);
for (int i = 900001; i <= 1000000; i++) {
cout << i << '\n';
}
}
经测试,以下五篇题解无法通过该数据:
https://www.luogu.com.cn/article/rqyjtwvq(TLE)
https://www.luogu.com.cn/article/2rcycx05(TLE)
https://www.luogu.com.cn/article/104gtmp7(TLE)
https://www.luogu.com.cn/article/ijmpw9at(RE)
https://www.luogu.com.cn/article/vyzemlv3(TLE)