请求加强数据& Hack 题解
查看原帖
请求加强数据& Hack 题解
752485
tbdsh楼主2023/9/28 13:17

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 附件

2023/9/28 13:17
加载中...