码迷,mamicode.com
首页 >  
搜索关键字:advanced queue    ( 10739个结果
js:数据结构笔记4--队列
队列是一种特殊的列表,数据结构为FIFO;定义:function Queue() { this.dataStore = []; this.enqueue = enqueue; this.dequeue = dequeue; this.front = front; this.bac...
分类:Web程序   时间:2014-10-16 12:18:02    阅读次数:189
[dfs+水] hdu 4462 Scaring the Birds
题意: N*N的矩阵中有M个点可以放稻草人,且给覆盖距离R 每个稻草人能覆曼哈顿距离R以内的点 问最少需要多少个稻草人 思路: 因为范围很小,直接可以暴力 注意稻草人所在的位置是不需要被覆盖的 代码: #include"cstdlib" #include"cstdio" #include"cstring" #include"cmath" #include"queue" #inclu...
分类:其他好文   时间:2014-10-15 21:54:41    阅读次数:139
C++调用约定和名字约定
调用约定是指程序在函数调用时传递参数和获取返回值所采用的方法:通过寄存器、或通过栈、或者是两者的混合。用于指定Calling Convention的修饰符主要有:__cdecl,__stdcall,__fastcall等。调用约定可以通过工程设置:Setting...\C/C++ \Advanced\CallingConvention 项进行选择,缺省状态为__cdecl。它们决定以下内容:  ...
分类:编程语言   时间:2014-10-15 19:28:31    阅读次数:252
Python之美[从菜鸟到高手]--threading daemon线程原理解读
事情的起因是我在看下面一段代码遇到的疑惑,明明是while True,为什么代码没有死循环??class D(threading.Thread): def __init__(self, queue): threading.Thread.__init__(self) self.queue = queue def run(self): w...
分类:编程语言   时间:2014-10-15 03:29:29    阅读次数:298
AFNetWorking Request failed: unacceptable content-type: text/html
今天写了一个快递查询的功能,使用的是AFNetWorking框架,贴个代码:dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ NSDictionary *dict=@{@"key"...
分类:Web程序   时间:2014-10-15 01:08:54    阅读次数:1672
HDU 1503 Advanced Fruits[ LCS ]
题目:HDU 1503 思路:先求出最长公共子序列,记录路径。后进行拼接。 代码#include #include #include #include #include #include #define mod 1000000007 using namespace std; typedef long long LL; int dp[110][120]; char x[100],...
分类:其他好文   时间:2014-10-15 00:31:08    阅读次数:208
队列实现例子
1 #ifndef QUEUE_H_ 2 #define QUEUE_H_ 3 4 #include 5 #define QUEUEMAX 10 6 7 typedef int Item; 8 9 typedef struct node10 {11 Item item;12 ...
分类:其他好文   时间:2014-10-14 18:31:39    阅读次数:233
Java数据结构与算法(4) - 队列(Queue和PriorityQ)
队列: 先进先出(FIFO)。优先级队列: 在优先级队列中,数据项按照关键字的值有序,关键字最小的数据项总在对头,数据项插入的时候会按照顺序插入到合适的位置以确保队列的顺序,从后往前将小于插入项的数据项后移。在图的最小生成树算法中应用优先级队列。示例代码:package chap04.Queue;c...
分类:编程语言   时间:2014-10-14 17:49:59    阅读次数:230
用Advanced Installer对C#项目打包
1、用SVN对项目代码UPDATE,然后COMMMIT上传最新代码。2、在debug模式(即开发模式)下,修改两个地方的版本号(1:SecurityManagerClient项目下的app.config配置文件;2:WCFServiceHosting项目下的app.config配置文件)。3、运行一...
分类:Windows程序   时间:2014-10-14 16:45:38    阅读次数:419
飘逸的python - 实现一个极简的优先队列
一个队列至少满足2个方法,put和get. 借助最小堆来实现. #coding=utf-8 from heapq import heappush, heappop class PriorityQueue: def __init__(self): self._queue = [] def put(self, item, priority): he...
分类:编程语言   时间:2014-10-14 15:05:08    阅读次数:193
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!