上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: setting->complier->linker settings->add->C:\Windows\System32\ws2_32.dll 阅读全文
posted @ 2014-04-12 10:28 偶尔会寂寞 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 调用API using System.Runtime.InteropServices; [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); public const int WM_SYSCOMMAND = 0x0112; public const 阅读全文
posted @ 2014-04-11 19:48 偶尔会寂寞 阅读(105) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace 窗体翻转{ public partial class Form1 : Form { //导入user32.dll [System.... 阅读全文
posted @ 2014-04-11 19:24 偶尔会寂寞 阅读(170) 评论(0) 推荐(0) 编辑
摘要: /*Simulated Annealing(模拟退火算法)求解旅行商问题(TSP)网上给的数据是31个省会的坐标,蚁群算法得到的结果是:15378我算的结果中,最好的一次是:15495*/#include#include#include//#include#include#include#define N 31 //城市个数#define Tmax 8000 //初始温度#define Tmin 1E-10 //终止温度#define RATE 0.95 //温度衰减率#define in_loop 13000 //内层循环次数#define out_loop 2000 //外... 阅读全文
posted @ 2014-03-19 20:48 偶尔会寂寞 阅读(542) 评论(0) 推荐(0) 编辑
摘要: in.c文件#includeint main(){printf("%d",3);return 0;}out.c文件#include#includeint main(){int t=0;scanf("%d",&t);printf("haha,%d\n",t);return 0;}test.bat文件cl in.clink in.objcl out.clink out.objin|outcmdwindows控制台下"|"命令可以直接将两个程序连接在一起,A程序的输出是B程序的输入,有木有很高大上的感觉? 阅读全文
posted @ 2014-03-18 13:02 偶尔会寂寞 阅读(144) 评论(0) 推荐(0) 编辑
摘要: C++程序从编译到链接然后再到调用的整个过程如下。 只是个人最近观点,希望能与志同道合的同学一起讨论。 注:这里只是研究C++的主流编译过程,与Java没有任何关系,因为使用的技术完全不一样(Java是编译和解释结合的语言)。并且由于不同的编译器厂商对于程序的编译过程不尽相同,但是主要流程还是一样的。 其实长久以来我就一直很不清楚obj文件的内容到底是什么,有人说是汇编,有人说是机器语言。如果是机器语言的话,那编译的过程是怎样加入操作系统信息的呢?因为这个问题的不断扩展和困扰,便决定彻底研究一下,网上几乎找不到相关资料,作者参照了基本系统编程的书籍后自行整理而来,数目见底,仅供参考,欢迎讨论。 阅读全文
posted @ 2014-03-16 15:29 偶尔会寂寞 阅读(1479) 评论(0) 推荐(0) 编辑
摘要: 历届试题 九宫重排 时间限制:1.0s 内存限制:256.0MB问题描述 如下面第一个图的九宫格中,放着 1~8 的数字卡片,还有一个格子空着。与空格子相邻的格子中的卡片可以移动到空格中。经过若干次移动,可以形成第二个图所示的局面。 我们把第一个图的局面记为:12345678. 把第二个图的局面记为:123.46758 显然是按从上到下,从左到右的顺序记录数字,空格记为句点。 本题目的任务是已知九宫的初态和终态,求最少经过多少步的移动可以到达。如果无论多少步都无法到达,则输出-1。输入格式 输入第一行包含九宫的初态,第二行包含九宫的终态。输出格式 输出最少的步数,如果不存在方案... 阅读全文
posted @ 2014-03-15 16:46 偶尔会寂寞 阅读(1752) 评论(2) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_DEPRECATE#include#include#define datatype inttypedef struct node{ datatype data; struct node* next;}STACK;//initial the stackSTACK* Init(STACK* s){ s = NULL; return s;}//push in stackSTACK* Push(STACK* s, datatype d){ STACK *p = (STACK*)malloc(sizeof(STACK)); ... 阅读全文
posted @ 2014-03-04 21:54 偶尔会寂寞 阅读(427) 评论(0) 推荐(0) 编辑
摘要: Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14578Accepted Submission(s): 7203Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecu 阅读全文
posted @ 2014-03-02 22:15 偶尔会寂寞 阅读(201) 评论(0) 推荐(0) 编辑
摘要: BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8663 Accepted Submission(s): 3862Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The boar... 阅读全文
posted @ 2014-03-01 20:32 偶尔会寂寞 阅读(216) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页