题目来源于牛客竞赛:https://ac.nowcoder.com/acm/contest/discuss
题目描述:
输入描述:
输出描述:
示例1:
示例2:
题解:
代码:
#include<bits/stdc++.h>
using namespace std;
const int inf=1000000007;
int a[305][305],d[2][305][305],n,m,x[305],y[305],z[305],k,f[305],ans;
int w[305][305][3],o;
c