资源简介
#include
using namespace std;
const int M = 3;
const int N = 5;
int Ava[M] = {3, 3, 2};
int All[N][M] = {{0,1,0},{2,0,0},{3,0,2},{2,1,1},{0,0,2}};
int Nee[N][M] = {{7,4,3},{1,2,2},{6,0,0},{0,1,1},{4,3,1}};
int work[N+1][M] = {{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}};
int flag[N][2] = {{0,0},{0,0},{0,0},{0,0},{0,0}};
int count = 0;
void Safe(int num);
int main()
{
int num = 0;
for (int k = 0; k < M; ++k)
{
work[num][k] = Ava[k];
}
Safe(num);
cout << "total: " << count;
system("pause");
return 0;
}
void Safe(int num)
{
if (num == N)
{
count++;
for (int m = 0; m < N; ++m)
{
cout << flag[m][1] << " ";
}
cout << endl;
}
代码片段和文件信息
- 上一篇:H5砸金蛋-特效+移动端试用
- 下一篇:新东方BEC中级词汇精选
评论
共有 条评论