可以针对 https://www.luogu.com.cn/record/161362255 @沉石鱼惊旋 这份提交,给出 TLE 和 WA。
发现提交含有注释 // test C032 不难猜测是将赛时通过的 C032 同学代码提交了上去。
hack0 是 TLE。
generator 如下:
#include <bits/stdc++.h>
using namespace std;
// mt19937 rnd(chrono::system_clock::now().time_since_epoch().count());
mt19937 rnd(998244353);
int R(int l, int r) { return rnd() % (r - l + 1) + l; }
int main()
{
freopen("hack.in", "w", stdout);
cout << 10 << " " << 10 << endl;
for (int i = 1; i <= 10; i++)
{
for (int j = 1; j <= 10; j++)
putchar('.');
putchar('\n');
}
string str = "DRUL";
string s = "ULDR";
while (str.size() + 4 <= 1000)
str = '(' + str + ")*" + s[R(0, 3)];
cout << str << endl;
return 0;
}
生成的 hack.in 对应 ans 文件为:
++++++++++
++++++++++
++++++++++
++++++++++
++++++++++
++++++++++
++++++++++
++++++++++
++++++++++
++++++++++
hack1 是 WA。
..........
#########.
#########.
#########.
#########.
#########.
#########.
#########.
#########.
..........
(RD)*
ans 文件为:
++++++++++
#########+
#########+
#########+
#########+
#########+
#########+
#########+
#########+
.........+