题解列表

筛选

蛇行矩阵 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n; int i,j; int k=1,m=1; scanf("%d",&n); for(i=0;i<……

校门外的树 (C++代码)用数组的方式解决

摘要:解题思路:先定义一个一维数组,将其全部赋值为1,数组模拟出马路中有多少课树(1为有树),然后每修建铁路的时候需要铲除掉的树设置为0,注意两端问题,这里的循环要用i<=结束,来表示。不多说直接上代码参考……

C++描述:用类解决

摘要:想看同类代码,请看我的空间!QAQ参考代码:#include <iostream>//先锋头文件  #include <algorithm> using namespace std; class……

C++描述:用函数最方便啦!QAQ

摘要:如果想看同类代码可看我的空间。用函数最简单了!QAQ#include <iostream>//先锋头文件  #include <algorithm> using namespace std; f……