码迷,mamicode.com
首页 > 其他好文
UVA Live 3713 Astronauts
用布尔变量表示状态,把限制条件转化为XνY的形式以后跑2SAT,根据变量取值输出方案。#includeusing namespace std;const int maxn = 1e5+5;#define PB push_backbool vis[maxn*2];vector G[maxn*2];in...
分类:其他好文   时间:2015-09-02 09:20:28    阅读次数:116
OSChina 周三乱弹 —— 前所未有的空虚
各位OSCer 大家壕,周三了,熬过今天,就可以放假,你不上班的时候会空虚吗,会寂寞吗? @在湖闻樟:最近有点空虚,还是把一直很想翻译的Supporting Python 3翻译下吧? 然而,最近瑞典的这位泊松老兄,也说自己感...
分类:其他好文   时间:2015-09-02 08:16:44    阅读次数:211
[Leetcode172]Factorial Trailing Zeroes
Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. solution: zero comes from 2*5, and number of 2 is less than 5. So...
分类:其他好文   时间:2015-09-02 08:16:22    阅读次数:170
[LeetCode 229] Majority element II
Given an integer array of size n, find all elements that appear more than ? n/3 ? times. The algorithm should run in linear time and in O(1) space. Solution: At most has two elements in the r...
分类:其他好文   时间:2015-09-02 08:15:45    阅读次数:140
/etc/fstab 参数详解及如何设置开机自动挂载
转自:http://blog.csdn.net/duyiwuer2009/article/details/8644753某些时候当Linux系统下划分了新的分区后,需要将这些分区设置为开机自动挂载,否则,Linux是无法使用新建的分区的。 /etc/fstab 文件负责配置Linux开机时自动挂载的...
分类:其他好文   时间:2015-09-02 08:16:30    阅读次数:173
异步函数
#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; }- (void)touchesB.....
分类:其他好文   时间:2015-09-02 08:16:00    阅读次数:153
rabbitmq之消息重入队列
说起消息重入队列还得从队列注册消费者说起,客户端在向队列注册消费者之后,创建的channel也会被主队列进程monitor,当channel挂掉后,主队列进程(rabbit_amqqueue_process)收到'DOWN'通知,将未ack的消息重入队列,并根据消息的deliver tag,也就是消...
分类:其他好文   时间:2015-09-02 08:13:05    阅读次数:414
同步函数
#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additio.....
分类:其他好文   时间:2015-09-02 08:15:22    阅读次数:160
$(function(){...})
这是JQUERY的内置函数,表示网页加载完毕后要执行的意思,和JAVASCRIPT原来的这个是一样的:window.onload=function(){ //执行函数} 相当于 $(document).ready(function(){ } )或者:也是一个意思。
分类:其他好文   时间:2015-09-02 08:12:29    阅读次数:133
*Rectangle Area
Find the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right corner as shown ...
分类:其他好文   时间:2015-09-02 08:12:36    阅读次数:120
每个人都应该懂点函数式编程
目录 一个问题 函数式编程中的函数 数学与函数式编程 混合式编程风格 一个问题 假设现在我们需要开发一个绘制数学函数平面图像(一元)的工具库,可以提供绘制各种函数图形的功能,比如直线f(x)=ax+b、抛物线f(x...
分类:其他好文   时间:2015-09-02 07:13:12    阅读次数:208
arguments.callee 调用自身
一、Arguments该对象代表正在执行的函数和调用他的函数的参数。[function.]arguments[n]参数function :选项。当前正在执行的 Function 对象的名字。n :选项。要传递给 Function 对象的从0开始的参数值索引。说明:Arguments是进行函数调用时,...
分类:其他好文   时间:2015-09-02 07:09:56    阅读次数:119
前端工程师技能之photoshop巧用(从效果图到雪碧图)1——准备篇
[1]项目流程 [2]photoshop的作用 [3]photoshop的初始化设置 [4]切图常用工具介绍 [5]其他常用快捷键
分类:其他好文   时间:2015-09-02 07:10:36    阅读次数:185
*Ugly number
题目:Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For e...
分类:其他好文   时间:2015-09-02 07:09:03    阅读次数:118
volist 标签
Volist标签主要用于在模板中循环输出数据集或者多维数组。volist标签(循环输出数据)闭合非闭合标签属性name(必须):要输出的数据模板变量id(必须):循环变量offset(可选):要输出数据的offsetlength(可选):输出数据的长度key(可选):循环的key变量,默认值为imo...
分类:其他好文   时间:2015-09-02 07:06:14    阅读次数:112
Palindrome Linked List
Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?Analyse: Obtain the elements first, ...
分类:其他好文   时间:2015-09-02 07:05:08    阅读次数:162
班级通讯录管理系统
#include #include #include using namespace std; struct student{ char s_no[20]; char s_name[20]; char s_sex[10]; char s_year[10]; char s...
分类:其他好文   时间:2015-09-02 07:06:41    阅读次数:270
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!