码迷,mamicode.com
首页 >  
搜索关键字:pragma once    ( 4839个结果
栈的应用举例-进行算术运算
这个例子是来自于严蔚敏的《数据结构》的栈那一节。 但是我进行了一些简单的修改,确保编译通过。 目的:利用栈 计算 “3*(7-2)”这样的字符串的算术运算的结果。 共有3个代码文件,如下: 1、mystack.h         #pragma once #define maxsize 30 typedef struct { char data[maxsize+1]; ...
分类:其他好文   时间:2014-06-05 07:35:18    阅读次数:242
hdu 4832 百度之星初赛二B
把横的和竖的分开考虑 //#pragma comment(linker, "/STACK:102400000,102400000") #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace...
分类:其他好文   时间:2014-06-05 06:04:58    阅读次数:238
How to estimate the time required for a program.
Once an algorithm is given for a problem and decided to be correct, an important step is to determine how much in the way of resources,such as time or space, the algorithm will require.         ...
分类:其他好文   时间:2014-06-05 02:14:29    阅读次数:306
ZOJ 3765 Lights Splay Tree的几种基本操作
区间的查询,点修改,插入和删除。先姑且当作模板吧,略挫,慢慢补充,慢慢优化。 #include #include #include #include #include #include #include #include #include #pragma comment(linker, "/STACK:1024000000"); #define EPS (1e-8) #d...
分类:其他好文   时间:2014-06-05 02:01:37    阅读次数:400
LeetCode: Remove Duplicates from Sorted List [082]
【题目】 Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. 【题意】 给定一个已排序的链表,删除其中的重复元素 【思路】 维护两个指针prev和cur, cur指针负责扫描链表,prev指向cur的前一...
分类:其他好文   时间:2014-06-03 04:05:39    阅读次数:231
hdu-4605-Magic Ball Game-线段树+离线操作
以前用树状数组做过一次,现在用线段树再刷一次。。。 首先必须先离散化。。。 然后建立2颗线段树,第一颗表示往左走,每个节点的值的分布。       第二颗表示往右走,每个节点的值的分布。 然后根据左右走的关系,判断出x,y的值。 #pragma comment(linker, "/STACK:1024000000,1024000000") #include #include #inclu...
分类:其他好文   时间:2014-06-03 01:25:54    阅读次数:315
HDU 3436 Queue-jumpers
从一开始学离散化就对它没有半毛钱好感,感觉出这种题纯属恶心人。 可以将Top x全部取出来然后离散化,缩点。剩下的就是伸展了,不再赘述。 也有人拿线段树过,一直没有想明白. . . #include #include #include #include #include #include #include #include #include #pragma comment...
分类:其他好文   时间:2014-06-02 23:24:50    阅读次数:338
BFS判断是否是二分图Bipartite算法
二分图bipartite 使用BFS广度优先判断一个图是否是二分图。基本图操作。 参考 http://www.geeksforgeeks.org/bipartite-graph/ #pragma once #include #include #include using namespace std; class CheckwhetheragivengraphisBipa...
分类:其他好文   时间:2014-06-01 15:03:24    阅读次数:288
java 编程基础
临近毕业,准备复习一些java的基础,顺便整理一下知识编程基础1.Java的特性和优势:简单、面向对象可移植( write once ,run anywhere )、高性能 ,分布式、动态性多线程安全健壮。2.Java的运行机制, 计算高级编程语言类型有:编译型、解释型. Java语言是这两种类型的...
分类:编程语言   时间:2014-06-01 11:41:26    阅读次数:332
PIC18F4520 UART模板
如题 #define USE_AND_MASKS #include #include #include #include #pragma config OSC = INTIO67 //internal oscillator #pragma config WDT = OFF //watchdog timer off #pragma config LVP = OFF...
分类:其他好文   时间:2014-06-01 11:16:04    阅读次数:246
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!