日记
m0_98292574
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
访问Daytime服务的客户端(TCP)
首次使用“winsock.in”可能导致部分函数不可用,解决方法参考博客 /*TCPdaytime*/ #include<cstdlib> #include<cstdio> #include<winsock.h> #include<string> using namespace std; void TCPdaytime(const char*,const char*); void errexit(const char*,...); SOCKET conne原创 2022-02-14 18:38:00 · 1486 阅读 · 0 评论 -
01背包,动态规划
#include<iostream> #include<algorithm> using namespace std; const int MAXN=10; const int MAXW=100; int w[MAXW]; //货物的重量 int v[MAXN]; //货物的价值 int dp[MAXN][MAXW]; int n,c; //货物的数量和价值 void traceback(); void detail(); int main() { cin&原创 2021-10-24 16:02:11 · 1922 阅读 · 0 评论 -
快速排序 && 归并排序
快速排序 #include<iostream> #define MAXSIZE 10005 using namespace std; int a[MAXSIZE]; //分区操作 int paritition(int a[],int low,int high){ int pivot=a[low]; while(low<high){ //从右到左找比 pivot 小的值 while(low<high&&a[high]>=pivot) --high;原创 2021-01-28 19:28:09 · 422 阅读 · 2 评论
分享