码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
VS2012+C语言+设置程序开机自动启动+示例
#include<stdio.h> #include<windows.h> #include<stdlib.h> char*ReplaceString(constchar*srcStr,constchar*src,constchar*dest)//替换字符串,获得文件路径 { char*ptr; intlen=strlen(srcStr); ptr=(char*)malloc(sizeof(char)*len+1); strcpy(ptr,srcSt..
分类:编程语言   时间:2014-05-05 12:29:50    阅读次数:422
hdu 4143 A Simple Problem (变形)
题目题意:给n,求x;直接枚举肯定超时, 把给的式子变形, (y+x)(y-x) = n;令y-x = b, y+x = a;枚举b, b 的范围肯定是sqrt(n), y = (a+b)/2; x = (a-b)/2;b越大, x越小, 所以倒着枚举b 1 #include 2 #include....
分类:其他好文   时间:2014-05-05 11:01:25    阅读次数:244
hdu 1598 find the most comfortable road
http://acm.hdu.edu.cn/showproblem.php?pid=1598 1 #include 2 #include 3 #include 4 #define maxn 2000 5 using namespace std; 6 const int inf=1<<30; 7...
分类:其他好文   时间:2014-05-05 10:53:38    阅读次数:344
model number
// test.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include "winioctl.h"#define IOCTL_STORAGE_QU...
分类:其他好文   时间:2014-05-05 10:52:44    阅读次数:370
hdu 1599 find the mincost route
http://acm.hdu.edu.cn/showproblem.php?pid=1599floyd找最小环。 1 #include 2 #include 3 #include 4 #define maxn 200 5 using namespace std; 6 const int inf...
分类:其他好文   时间:2014-05-05 10:52:15    阅读次数:315
createprocess并行运算
#include "stdafx.h"#include "windows.h"#include using namespace std;int _tmain(int argc, _TCHAR* argv[]){ STARTUPINFO si; PROCESS_INFORMATION...
分类:其他好文   时间:2014-05-05 10:31:18    阅读次数:412
HDU 3501 Calculation 2(欧拉函数的应用)
HDU 3501 Calculation 2大意:求1~n之间与n不互质的数的总和。思路:欧拉函数的应用;先用欧拉函数求出与n互质的总数m,计算m个数的总和,用n的总和减去m的总和就是想要的结果。 1 #include 2 #define LL __int64 3 4 int eular(int.....
分类:其他好文   时间:2014-05-05 10:29:56    阅读次数:308
Linux内核之旅 链表实现
1 #include "stdio.h" 2 #include "stdlib.h" 3 4 struct list_head{ 5 struct list_head *prev; 6 struct list_head *next; 7 }; 8 9 struct task{1...
分类:系统相关   时间:2014-05-05 10:10:11    阅读次数:462
MSP430FR5739串口程序
今天急着用这个片子的串口,匆忙中调试串口也话费了一段时间,在网上下了一个程序,忽然就把所有问题搞清楚了,只是中断就看着头文件中寄存器写的,虽然通讯正常,不过不确定有没有写错。代码如下:#include void Uart_Init(void){ P2SEL1 |= BIT0 + BIT1; ...
分类:其他好文   时间:2014-05-05 09:56:41    阅读次数:457
hdu 3501 Calculation 2 (欧拉函数)
题目题意:求小于n并且和n不互质的数的总和。思路:求小于n并且与n互质的数的和为:n*phi[n]/2 .若a和n互质,n-a必定也和n互质(a1是,phi(m)表示比m小且与m互质的正整数个数 1 #include 2 #include 3 #include 4 #include 5 #i...
分类:其他好文   时间:2014-05-05 09:50:27    阅读次数:396
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!