POJ
只有吃吃喝喝才能长肉
这个作者很懒,什么都没留下…
展开
-
递归实现链表的反转
我对递归的理解一直不是非常透彻,这里想要用递归实现链表的反转,写的时候发现自己连链表的定义都忘记了、、、、还是代码写得太少了#include"stdio.h"#include <malloc.h>#include"iostream"using namespace std;struct node { int data; struct node* next;...原创 2019-11-18 21:29:10 · 125 阅读 · 0 评论 -
poj 2503
不知道为什么编译错误,VS里面可以正常跑呜呜呜呜呜#include <iostream>#include <cstring>#include <cstdio> #include <map>using namespace std;int main(){ map<string, string> dic; map&...原创 2019-11-03 16:14:20 · 194 阅读 · 0 评论 -
POJ 2366 sort函数 二分查找
题目:POJ2366 这道题就是要找出两个数组中是否有相加位10000的数,用到了alorithm库里面的sort函数,然后用二分查找binary_search。#include"iostream"#include"algorithm"using namespace std;bool binary_search(int k, int a[], int n) { int begi...原创 2019-11-03 14:35:32 · 420 阅读 · 0 评论