自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(37)
  • 收藏
  • 关注

转载 POJ2159解题报告

英文题鸭梨山大。读了很久题才读明白,但是没有看到重要的地方,导致WA。 主要题意就是介绍2种加密方式,第一种是将每个字母ascii加相同的值(注意,不一定加1,只是例子是加1),超过Z返回A。 第二种就是将字符串打乱(不一定是按照题干的序列打乱)。 然后这个题就是统计一下各...

2015-03-07 14:55:00 66

转载 C++实现龙贝格计算积分

#include <iostream>#include <cmath>#include <iomanip>using namespace std;double f(double x) //函数f(x){ return pow(x, 1.0/3...

2015-03-07 14:55:00 420

转载 KMP算法 C++实现

#include <iostream>#include <string>#include <vector>using namespace std;void getNext(const string &substr, vector<int...

2015-03-07 14:55:00 62

转载 进程注入学习

这次目标是使用进程注入,将一段shellcode注入到一个进程,然后执行。 主要的思路是1.编写shellcode,目的是弹出一个对话框 2.在目标进行分配一段空间,并且写入shellcode,然后使用CreateRemoteThread() API创建一个远程线程并且执行。 1.sh...

2015-03-07 14:55:00 81

转载 数据结构链表C++实现

#include <iostream>#include <stdexcept>#include <string>using namespace std;template<class ElemType>class linklist{p...

2015-03-07 14:55:00 46

转载 vs2010将杂乱的代码格式化

有时候百度贴吧里的用户发的代码比较乱,复制到自己的IDE里面连看都不想看。今天发现一个神器 AStyle 。下载地址 http://sourceforge.net/projects/astyle/files/latest/download 他可以把杂乱的代码格式化。原版是用命令行...

2015-03-07 14:55:00 193

转载 九度OJ 1003

#include <iostream>#include <string>#include <sstream>#include <algorithm>bool judge(const char& ch){ if(ch =...

2015-03-07 14:55:00 58

转载 OJ百练1005

#include <iostream>#include <cmath>using namespace std;int years(float x, float y){ float r = sqrt(x * x + y * y); float sq...

2015-03-07 14:55:00 86

转载 九度OJ 1001

#include <iostream>#include <vector>using namespace std;int main(){ int m, n; vector<int> matrix; while(cin >...

2015-03-07 14:55:00 58

转载 POJ1083结题报告

这个题一开始没有什么思路,毕竟算法水平基本为0…… 看了一位同学的解析之后一下就明白了。按照这个方法,这题很水了。高手的思路真是不一般 将走廊分成200份,有东西走过时,计数器加一。 最后将走过次数最多的地方*10就可以了。 #include <utility>#...

2015-03-07 14:55:00 91

转载 数据结构hashtable C++实现 非链式

#include <iostream>#include <vector>using namespace std;bool isPrime(int x){ for(int i = 2; i * i <= x; ++i) { ...

2015-03-07 14:55:00 65

转载 POJ2262解题报告

真题真心水题,不过做的时候2了…… 一开始将100000以下的素数打表……超时,然后怒了,将所有素数输出到文件里面,然后直接手动建表……代码长度过长了…… 无语了。 其实直接计算需要的计算的数就可以了…… #include <iostream>using n...

2015-03-07 14:55:00 61

转载 C++本地化小结

MinGW对c++的std::locale支持不佳,在MinGW程序下使用本地化功能要直接用c版本,setlocale(LC_ALL, ""); 这样wchar_t就可以一次性读2个字节的数据了,否则wchar_t只可以一次性读一个字节。但是输出的时候,不能用wcout,只能用wprin...

2015-03-07 14:55:00 117

转载 各种排序算法的C++实现

#include <iostream>#include <ctime>#include <iterator>#include <vector>#include <algorithm>#include <string&g...

2015-03-07 14:55:00 44

转载 数据接口线性表C++实现

#include <iostream>#include <malloc.h>using namespace std;const int list_init_size = 100;const int listincrement = 10;template<...

2015-03-07 14:55:00 65

转载 记录使用ubuntu的一些经历

1.安装 gcc g++ sudo apt-get install build-essential 用上面命令安装 GCC ,可以编译C++的 编译命令: g++ -o test test.cpp 运行编译后的程序: ./test 2.cairo-dock 类似...

2015-03-07 14:55:00 106

转载 数据结构队列C++实现 链式和循环

#include <iostream>#include <stdexcept>#include <string>using namespace std;namespace my_space{ template<class ElemTy...

2015-03-07 14:55:00 63

转载 数据结构二叉查找树C++实现

#include <iostream>using namespace std;template<class Comparable>class BinarySearchTree{public: BinarySearchTree(); Binary...

2015-03-07 14:55:00 71

转载 OJ百练1001

#include <iostream>#include <string>#include <cmath>using namespace std;string strMultiplies(const string& str1, const s...

2015-03-07 14:55:00 71

转载 九度OJ 1005

#include <iostream>#include <queue>#include <algorithm>#include <iterator>using namespace std;class student{public:...

2015-03-07 14:55:00 48

转载 OJ百练1002 487-3279

<span style="font-family: Arial, Helvetica, sans-serif;">#include <iostream></span> #include <string>#include <vector&...

2015-03-07 14:55:00 84

转载 函数名、变量前后的_(一个下划线)、__(两个下划线)分别有什么用

此文是转载:原文地址点击打开链接 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////...

2015-03-07 14:55:00 259

转载 数据结构 hashtable C++实现 链式

#include <iostream>#include <vector>#include <list>#include <algorithm>#include <iterator>bool isPrime(int x){...

2015-03-07 14:55:00 58

转载 数据结构双向链表C++实现

#include <iostream>#include <stdexcept>using namespace std;template<class ElemType>class dblist{public: dblist(); ...

2015-03-07 14:55:00 53

转载 数据结构二叉堆C++实现 最小堆

#include <iostream>#include <vector>#include <algorithm>#include <iterator>using namespace std;template<class Compa...

2015-03-07 14:55:00 148

转载 九度OJ 1004

#include <iostream>#include <vector>#include <cmath>#include <algorithm>using namespace std;int main(){ int m; ...

2015-03-07 14:55:00 51

转载 九度OJ 1008

#include <iostream>#include <cstdio>#include <vector>#include <algorithm>#include <bitset>#include <map>#...

2015-03-07 14:55:00 74

转载 栈溢出攻击的理解

栈溢出攻击首次提出是在1996年,Aleph One发表了一篇名为Smashing the stack for fun and Profit的文章。介绍了一种在Linux/Unix系统,利用缓冲区溢出的方式来攻击目标程序来改变程序的执行方式的技术。该文章将以前看起来高大上的缓冲区溢出用浅显...

2015-03-07 14:55:00 132

转载 数据结构avlTree C++实现

#include <iostream>using namespace std;template<class Comparable>class AvlTree{public: AvlTree(); AvlTree(const AvlTree&am...

2015-03-07 14:55:00 61

转载 九度OJ 1009

#include <iostream>#include <string>using namespace std;int main(){ int n; while(cin >> n, n != 0) { stri...

2015-03-07 14:55:00 59

转载 OJ百练1003:Hangover

#include <iostream>using namespace std;int cards(float lenth){ int num = 1; float currentLen = 0.5f; while(lenth >= current...

2015-03-07 14:55:00 97

转载 POJ1503

大数相加没什么好说的,就是代码写的稀烂…… #include <iostream>#include <string>#include <algorithm>using namespace std; int main(){ fr...

2015-03-07 14:55:00 66

转载 poj3299 解题报告

这个题还是算POJ中比较水的主要题意就是获得公式中3个变量中的其中2个然后求第三个。 humidex = temperature + h h = (0.5555)× (e - 10.0) e = 6.11 × exp [5417.7530 × ((1/273.16)...

2015-03-07 14:55:00 83

转载 九度OJ 1002

#include <iostream>#include <cmath>#include <iomanip>using namespace std;int abs(int n){ return n < 0 ? -n : n;}int...

2015-03-07 14:55:00 67

转载 POJ2739解题报告

不算很难的题,看清题干,必须是连续的素数序列。看清这点一般就可以做出来了。 首先将10000内的素数存到一个数组里面,我开了1300大小的数组。 设置一个上标和下标。设置一个sum为连续序列的和,num为所求的数。 1、当sum < num时 判断一下sum+上标指定的素数...

2015-03-07 14:55:00 109

转载 POJ3006

题意是一个序列a, a+d,a+2d,……,a+nd; 给定a,d,n,让你找出第n个素数 #include <iostream>using namespace std; bool isprime(int num){ /****************...

2015-03-07 14:55:00 68

转载 数据结构栈的C++实现

#include <iostream>#include <stdexcept>#include <malloc.h>using namespace std;namespace my_space{ template<class Elem...

2015-03-07 14:55:00 78

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除