坑,直接把公路看成X轴来做,然后,排序扫描一下,你懂的。#include #include #include #include using namespace std;const int MAXN=10100;struct Village{ double l,r;};Village p[MAXN];...
分类:
其他好文 时间:
2014-08-09 13:16:27
阅读次数:
191
#include
#include
main()
{
struct objects{
char name[20];
int size;
char color[10];
float weight;
float height;
};
struct objects obj1;
struct objects *p;
p=&obj1;
strcpy(obj1.nam...
分类:
其他好文 时间:
2014-08-09 11:49:17
阅读次数:
277
#include
#include
struct node
{
int data;
struct node *next;
};
typedef struct node MODETYPE;
main()
{ MODETYPE s1,s2,s3,*begin,*p;
s1.data=100;
s2.data=200;
s3.data=300;
begin=&s1;
s1.next=...
分类:
其他好文 时间:
2014-08-09 11:43:57
阅读次数:
223
//5种迭代器,为了激活重载机制,定义的5个类型。每种迭代器就是一个类型。
struct input_iterator_tag{};
struct output_iterator_tag{};
struct forward_iterator_tag : public input_iterator_tag{};
struct bidirectional_iterator_tag:public fo...
分类:
其他好文 时间:
2014-08-09 11:43:17
阅读次数:
275
#include#includeusing namespace std;struct point{ int x, y;};point bufa[8] ={ {-2, 1}, {-1, 2}, {1, 2}, {2, 1}, {2, -1}, {1, -2}, {-1, -2}, {-2, -1}};...
分类:
其他好文 时间:
2014-08-09 11:29:47
阅读次数:
290
//BFS#include #include using namespace std;bool used[8][8];int move[8][2]={1,2, -1,2, -2,1, -2,-1, -1,-2, 1,-2, 2,-1, 2,1};struct position{ int i,j...
分类:
其他好文 时间:
2014-08-09 11:21:17
阅读次数:
245
1 #include 2 #include 3 4 char en[11],fr[11]; 5 int st; 6 struct Tire{ 7 int next[26]; 8 char eng[11]; 9 }node[200005];10 void insert(char...
分类:
其他好文 时间:
2014-08-09 02:27:38
阅读次数:
266
/** \brief poj 3253
*
* \param date 2014/8/8
* \param state AC
* \return memory 1124K time 125ms
*
*/
#include
#include
#include
#include
using namespace std;
struct number
{
//int x;...
分类:
其他好文 时间:
2014-08-08 21:33:06
阅读次数:
291
1 递归,很简单
代码:
#include
using namespace std;
typedef struct node{
int data;
struct node * pNext;
}Node ,*pNode;
void createNode(pNode & pHead){
int temp;
scanf("%d",&temp);
pNode p,q;
boo...
分类:
其他好文 时间:
2014-08-08 21:28:56
阅读次数:
314
内存管理
页
内核把物理页作为内存管理的基本单位;内存管理单元(MMU,管理内存并把虚拟地址转换为物理地址)通常以页为单位进行处理。MMU以页大小为单位来管理系统中的页表。从虚拟内存的角度看,页就是最小单位。
32位系统:页大小4KB
64位系统:页大小8KB
在支持4KB页大小并有1GB物理内存的机器上,物理内存会被划分为262144个页。内核用 struct page 结构表示系统中...
分类:
系统相关 时间:
2014-08-08 21:25:26
阅读次数:
496