题解列表

筛选

信息学奥赛一本通T1310-车厢重组-题解(C++代码)

将每组车厢节数从小到大进行排序,相邻两个元素进行交换,此题可采用冒泡算法,i次交换的次数等于前i-1次交换的次数```cpp#include#includeusingnamespacestd;inta[10005];intf[10005];intmain(){intN,

[编程入门]报数问题-题解(C++代码)

思路主要是利用循环链表和for循环,可能较为繁琐1.构建循环链表Node*setList(intn){Node*head=(Node*)malloc(sizeof(Node));Node*p=(Node*)malloc(sizeof(Node));head->data=1;if(n>1){head->

Minesweeper -题解(C++代码)

#####此题不难,难在翻译,会翻译了就简单了,此题我个人感觉我用的内存比较大#includeusingnamespacestd;intmain(){intn,m,count=1;while(cin>>n>>m&&n!=0&&m!=0){charMine[100][100];intmine[100][