题解列表

筛选

使用STL,12行代码解题 (C++代码)

摘要:解题思路:    使用STL标准模板库。注意事项:    sort的头文件库名要注意。及其使用方式。参考代码:#include<iostream> #include<cstring> #inclu……

指针配合STL轻松解题 (C++代码)

摘要:解题思路:    STL大法好。注意事项:    max_element函数返回的是元素地址。参考代码:#include<iostream> #include<cstdio> #include<a……

采药 (C++代码)

摘要://使用滚动数组 #include<cstdio> #include<algorithm> #include<iostream> using namespace std; int dp[10……

数据结构-简单选择排序 (C++代码)

摘要:解题思路:注意事项:参考代码:自己总结出了一条代码://选择排序的基本思想是: //每一趟比较过程中, //在n-i+1(i=1,2,...,n-1) //个记录中选取关键字最小的记录作为有序序……