rt
题解
数据生成器如下:
#include<bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]){
int n = 1e5, m = 1e5;
#define rd(x) rd() % (x)
cout << n << ' ' << m << " \n0 ";
for (int i = 2; i < n; i++){
cout << 1e3 << ' ';
}
cout << "0\n";
while (m--){
cout << 1e3 << ' ' << 1 << '\n';
}
return 0;
}
答案:全是 1.
题解代码 TLE
具体见 U313761 附件