View Code 1 /* 2 Source Code for Cryptography (Just a touch) 3 4 5 6 SOURCE CODE FOR MD5 7 8 md5.h (the include file for the above C code) 9 10 Karn Encryption: Symmetric Secret with MD5 11 12 SHA-1 By Steve Reid 13 14 RSA Crypto Toolkit Totality 15 16 DES Encrypti... Read More
posted @ 2012-10-21 23:45 godjob Views(559) Comments(0) Diggs(0)
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=233题目类型: 数据结构, 二叉树题意与背景:同二叉树一样,四叉树也是一种数据结构,是一种每个节点... Read More
posted @ 2012-10-20 23:12 godjob Views(1754) Comments(0) Diggs(0)
转的题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=104&page=show_problem&problem=489递归求解,可以不用建树。#include<iostream>#include<sstream>#include<string>#include<algorithm>usingnamespacestd;constintminn=100000005;intinorder[10002];i Read More
posted @ 2012-10-20 23:10 godjob Views(294) Comments(0) Diggs(0)
常用网络端口简介TCP/UDP端口可分为3大类, 按端口号分:(1)公认端口(Well Known Ports):从0到1023,它们紧密绑定(bind)于一些服务。通常这些端口的通讯明确表明了某种服务的协议。不可随意更改. 例如:80端口实际上总是HTTP通讯。 (2)注册端口(Registered Ports):从1024到49151。它们松散地绑定于一些服务。也就是说有许多服务绑定于这些端口,这些端口同样用于许多其它目的。例如:许多系统处理动态端口从1024左右开始。(3)动态的(和/或)私有端口(Dynamic and/or Private Ports):从49152到65535。理论 Read More
posted @ 2012-10-19 21:47 godjob Views(6677) Comments(0) Diggs(0)
// hello.cpp : 定义控制台应用程序的入口点。//#define WPCAP#define HAVE_REMOTE#include "stdafx.h"#include <iostream>#include <algorithm>#include <string>#include <vector>/** we do not want the warnings about the old deprecated and unsecure CRT functions* since these examples can b Read More
posted @ 2012-10-19 20:45 godjob Views(178) Comments(0) Diggs(0)
#include <stdio.h>int main(){ int t,i,j,n,m,h,sum,a[4000]; scanf("%d",&t); while (t--) { scanf("%d",&n); for (i=1;i<=n;i++) a[i]=0; sum=0; scanf("%d",&m); for (i=1;i<=m;i++) {scanf("%d",&h); for (j=1;j*h<=n;j++) a[j*h]=1; } for ( Read More
posted @ 2012-10-17 20:46 godjob Views(192) Comments(0) Diggs(0)
很久不做题了,做也做水题,做水题也做不出,想很久没想出来,看了一下别人的blog,可以这么想,要产生一个交点至少要上下各两个点,这样答案出来了,上面有(a-1)*a/2种,同理下面也是,这样就得到答案了 1 #include <cstdio> 2 #include <iostream> 3 using namespace std; 4 5 int 6 main ( int argc, char *argv[] ) 7 { 8 freopen("data","r",stdin); 9 long long int a,b;10 int Read More
posted @ 2012-10-13 21:36 godjob Views(168) Comments(0) Diggs(0)
很有趣的一个网站,看看你能闯多少关http://www.pythonchallenge.com/pc/def/0.html答案:http://wiki.pythonchallenge.com/index.php?title=Main_Page Read More
posted @ 2012-10-11 22:30 godjob Views(241) Comments(0) Diggs(0)
第一部分为位图文件头BITMAPFILEHEADER,是一个结构,其定义如下:typedef struct tagBITMAPFILEHEADER {WORD bfType;DWORD bfSize;WORD bfReserved1;WORD bfReserved2;DWORD bfOffBits;} BITMAPFILEHEADER; 这个结构的长度是固定的,为14个字节(WORD为无符号16位整数,DWORD为无符号32位整数),各个域的说明如下:bfType指定文件类型,必须是0x424D,即字符串“BM”,也就是说所有.bmp文件的头两个字节都是“BM”。bfSize指定文件大小,包括 Read More
posted @ 2012-10-10 11:41 godjob Views(1137) Comments(0) Diggs(0)
#include"stdafx.h"#include<iostream>#include<string>#include"http/request.h"usingnamespacestd;int_tmain(intargc,_TCHAR*argv[]){RequestmyRequest;//初始化类stringsHeaderSend;//定义http头stringsHeaderReceive;//返回头stringsMessage="";//返回页面内容boolIsPost=false;//是否Post提交in Read More
posted @ 2012-10-09 23:46 godjob Views(875) Comments(0) Diggs(0)