题意 :
- 给一段随机数代码,要求构造一个符合条件的迷宫卡掉至少25%数据
- 符合条件 :最大20*20;路径不出现环;至少两格路径;连通图
- 每个球一起动可以理解成合并后一起动
思路 :
- 构造一条尽可能长且不那么对称的道路,效果非常优(具体可以考虑当矩阵是1*n的情况)。同时,还有尽可能将格子用上,可以用来加一些死路的分叉
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <unordered_set>
#include <math.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
#define endl '\n'
#define fi first
#define se second
#define push_back
#define rep(i, l, r) for (ll i = l; i <= r; i ++ )
void solve()
{
cout << 20 << ' ' << 20 << endl;
string s[20] = {
{"11011100011100011111"},
{"10110100110100110101"},
{"11101101101101101101"},
{"10011011011011011010"},
{"00110110110110110111"},
{"01101101101101101101"},
{"11011011011011011011"},
{"10110110110110110110"},
{"11101101101101101101"},
{"10011011011011011001"},
{"10110110110110110111"},
{"01101101101101101101"},
{"11011011011011011011"},
{"10110110110110110110"},
{"11101101101101101101"},
{"10011011011011011001"},
{"00110110110110110111"},
{"11101101101101101101"},
{"10011001011001011011"},
{"11110111110111110110"}
};
for (int i = 0; i < 20; i ++ ) cout << s[i] << endl;
}
int main()
{
cin.tie(nullptr) -> sync_with_stdio(false);
// int _;
// cin >> _;
// while (_ -- )
solve();
return 0;
}