java 队列、优先级队列、双向队列示例演示代码...
分类:
编程语言 时间:
2014-06-15 20:10:30
阅读次数:
271
题目
The count-and-say sequence is the sequence of integers beginning as follows:
1, 11, 21, 1211, 111221, ...
1 is read off as "one
1" or 11.
11 is read off as "two
1s" or 21.
21 i...
分类:
其他好文 时间:
2014-06-15 18:51:33
阅读次数:
220
题目大意:
问A-B 走K 部的方法数。
如果矩阵 a 为任意一个点到另外一个点 走 1 步的方法数
那么 a*a 就是任意一个点到另外一个点 走 2 步的方法数
。。。
那么直接快速幂。
#include
#include
#include
#include
#include
#define N 10
using namespace std;
in...
分类:
其他好文 时间:
2014-06-15 18:02:55
阅读次数:
212
题目:再一句话里面有P,I,U中的2个已知量,求第三个未知量。(P=I*U)
分析:字符串。利用'='定位已知量,然后将'='后面的的数字和单位分别读入处理。
说明:注意单位有m(10^-3),k(10^3),M(10^6)的前缀,以及小数点的处理。
#include
#include
#include
#include
using namespace std;
char Sat...
分类:
其他好文 时间:
2014-06-15 17:48:02
阅读次数:
199
#!/usr/bin/python
# -*- coding: utf-8 -*-
# 8–2. 循环. 编写一个程序, 让用户输入三个数字: (f)rom, (t)o, 和 (i)ncrement .
# 以 i为步长, 从 f 计数到 t , 包括 f 和 t . 例如, 如果输入的是 f == 2,
# t == 26, i == 4 , 程序将输出 2, 6, 10,...
分类:
编程语言 时间:
2014-06-15 16:35:25
阅读次数:
444
1、假clone,虚拟机只是将对象的内存地址clone了一份,修改克隆后的对象内容,将影响原对象
public class Employee{
public Employee(){
}
public Employee(String name, int age){
this.age = age;
this.name = name;
...
分类:
编程语言 时间:
2014-06-15 16:33:26
阅读次数:
295
SSH 框架下code:
public String deleRubbishAd(){
int deleADcount = 0;
rubbishADtp = configDao.rubbishADtp();
//数据库中的广告图片集合
Map shujuku= new HashMap();
File adfile = new File("C://Program Files//A...
分类:
数据库 时间:
2014-06-15 15:55:30
阅读次数:
252
// enter any type data to show Binary.c
// 输入任意类型数据转换成二进制
// version: 1.0
// date: 2014.6.12
// BUG提交: yinjunwithu@outlook.com
// 缺陷: 请勿使用vc 6.0编译 因为不支持long long及unsigned long long类型
// #define _CRT_...
分类:
编程语言 时间:
2014-06-15 09:44:48
阅读次数:
414
一道字符串倒置的题目,不是全部倒置,而是每个单词倒置,单词之间顺序不变。
这道题目应该是很经典的,好多次看到,包含编程珠玑的案例,典型的O(n)算法,每个word倒置,再整个string倒置。
这次要上战场了,却发现C C++的 字符串函数不熟练了,最近写的都是Java,一个Split函数爽到爆,于是决定要吧C C++的常用字符串函数过一遍,
并对各种方法实现,此处总结下Sp...
分类:
编程语言 时间:
2014-06-15 08:54:30
阅读次数:
262
nixio.syslog("string") 函数用来debug luci
http://luci.subsignal.org/api/nixio/modules/nixio.html...
分类:
其他好文 时间:
2014-06-15 08:53:30
阅读次数:
1593