## **木块问题详细注释版**
#include<iostream>
#include<vector>
#include<string>
using namespace std;
const int maxn = 30;
int n;//有n个木块
vector<int>pile[maxn];//每个pile[i]是一个vector
//找木块a所在的pile(堆)和height(高),以引用的形式返回调用者
void find_block(int a, int& p, int& h)
{
for (p = 0; p < n; p++)
for (h = 0; h < pile[p].size(); h++)
if
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交