题目来源:HDU 3081 Marriage Match II
题意:
思路:
错误代码 纠结不知道哪错了 先放一放
#include
#include
#include
#include
#include
using namespace std;
const int maxn = 1010;
const int INF = 999999999;
struct Edg...
分类:
其他好文 时间:
2014-05-09 02:38:25
阅读次数:
264
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
测试程序:
#include
#include
struct dev
{
int a;
char b;
float c;
};
struct dev devs[]=
{
{
1,'a',7.0,
},
{
1,'a',7.0,
},
{
...
分类:
系统相关 时间:
2014-05-09 02:10:16
阅读次数:
494
题意:求长度不超过K的最大的连续序列的和
思路:采用单调队列,我们要求的是Max{sum[i]-sum[j]}(i-j#include
#include
#include
#include
using namespace std;
const int MAXN = 1000005;
const int INF = 0x3f3f3f3f;
int n,k;
int arr[MAXN],s...
分类:
其他好文 时间:
2014-05-09 01:57:07
阅读次数:
264
chapter 8 内核代码
8.1.1中断处理程序
traps.c
#define get_seg_byte(seg,addr) ({ \ //取seg中addr处1byte
register char __res; __asm__("push %%fs;mov %%ax,%%fs;movb %%fs:%2,%%al;pop %%fs" ...
分类:
系统相关 时间:
2014-05-09 01:48:26
阅读次数:
418
#include
#include
#define FALSE 0 //函数执行错误返回0
#define TRUE 1 //函数执行正确返回1
//串的堆分配存储表示
typedef struct
{
char *ch;
int length;
}String;
//对串的所有操作都可以通过以下五个基本函数实现
void StrInit(String *);//串的初始化...
分类:
其他好文 时间:
2014-05-09 01:25:02
阅读次数:
294
最近工作变得轻松了很多,有了一些空闲的时间,准备把大学时候的C++抓起来,并且研究研究算法:
第一个C++程序:计算圆的面积,也是看其他的博客写出来的C++程序。...
分类:
编程语言 时间:
2014-05-09 00:38:19
阅读次数:
376
这题wa了很多词,题目本身很简单,把a/b搞反了,半天才检查出来。 1 #include 2
#include 3 #include 4 5 char isPrime[100001]; 6 7 int main() { 8 int i, j, q, p,
maxi, maxj, m...
分类:
其他好文 时间:
2014-05-08 23:55:19
阅读次数:
515
#include#include#include#includeusing namespace
std;const int M=1000;int main(){ string china; int
a[M]={-1},b[M]={-1},i,indexa,indexb,len,m; ...
分类:
其他好文 时间:
2014-05-08 23:27:02
阅读次数:
540
FileUtils//文件管理工具FileUtils::getInstance()std::string getStringFromFile(const
std::string& filename);//读取文件中的字符串Data getDataFromFile(const
std::string&...
分类:
移动开发 时间:
2014-05-08 23:00:07
阅读次数:
419