• 大小: 1KB
    文件类型: .txt
    金币: 1
    下载: 0 次
    发布日期: 2021-06-10
  • 语言: 其他
  • 标签:

资源简介

#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&#40;"pause"&#41;; return 0; } void Safe(int num) { if (num == N) { count++; for (int m = 0; m < N; ++m) { cout << flag[m][1] << " "; } cout << endl; }

资源截图

代码片段和文件信息

评论

共有 条评论

相关资源