摘要: 题目 作物杂交是作物栽培中重要的一步。已知有 N种作物 (编号 1 至 N ),第 i 种作物从播种到成熟的时间为 Ti​。作物之间两两可以进行杂交,杂交时间取两种中时间较长的一方。如作物 A 种植时间为 5 天,作物 B 种植时间为 7 天,则 AB 杂交花费的时间为 7 天。作物杂交会产生固定的 阅读全文
posted @ 2023-10-20 20:08 小菜碟子 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 4 #define STACKSIZE 256 5 6 int Result;//记录结果 7 8 typedef struct 9 { 10 int row; 11 int col; 12 }QueenP 阅读全文
posted @ 2023-10-20 20:02 小菜碟子 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <array> using namespace std; //stack.h template<typename T> class Array { public: Array(int row,int col); T* operator[](i 阅读全文
posted @ 2023-10-20 20:01 小菜碟子 阅读(10) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <stdio.h> #include <iostream> using namespace std; #define STACK_INIT_SIZE 100 //栈初始开辟空间大小 #define STACK_INCREMENT 10 //栈 阅读全文
posted @ 2023-10-20 19:59 小菜碟子 阅读(13) 评论(0) 推荐(0) 编辑