先是想筛法素数表啊,然后1~2000000000枚举打表啊,结果越想越不对。
后来想到唯一分解定理,可是怎么实现呢。。果然还是需要努力啊。。
研究了discuss代码,码之~
~~~~
dp的思想,若dp[i]是Humble Numbers,那么dp[i]*2,dp[i]*3,dp[i]*5,dp[i]*7都将是Humble Numbers。
所以只需要注意连续性便好了。
#inclu...
分类:
其他 时间:
2014-08-18 18:32:52
收藏:
0 评论:
0 赞:
0 阅读:
363
/*
* 算法导论 第九章 中位数和顺序统计学
* 线性时间选择元素
*/
#include
#include
using namespace std;
int minimum(int *arr, int len);
int randomizedSelect(int *arr, int p, int r, int i);
int randomizedPartition(int *ar...
分类:
其他 时间:
2014-08-18 18:32:42
收藏:
0 评论:
0 赞:
0 阅读:
528
取巧实现cocos2d-x输入框的多行输入...
分类:
其他 时间:
2014-08-18 18:32:32
收藏:
0 评论:
0 赞:
0 阅读:
529
Php面向对象—静态成员
静态属性
使用static关键字声明的属性
该静态属性,在逻辑上,是定义在类上面的属性。保证一个类,对应一个属性。
例子:
class Student
{
public $stu_id;
public $stu_name;
public static $stu_count = 0;
public functi...
分类:
Web开发 时间:
2014-08-18 18:32:22
收藏:
0 评论:
0 赞:
0 阅读:
358
/** 将所有数据导出成Excel,让客户知道哪些记录是异常的(异常的变红色) */public void exportExcel(ArrayList prisonerImportList, String dir, String filename) {dir = dir + "/" + filena...
分类:
其他 时间:
2014-08-18 18:31:12
收藏:
0 评论:
0 赞:
0 阅读:
343
下面是完整的例子,可以通过命令行编译即可看到效果。Test.csusing System;using System.Drawing;using System.Windows.Forms;using System.Runtime.InteropServices;using System.Reflect...
分类:
Web开发 时间:
2014-08-18 18:31:02
收藏:
0 评论:
0 赞:
0 阅读:
405
题意:给定完全无向图,求其中m个子节点,要求Sum(edge)/Sum(node)最小。思路:由于N很小,枚举所有可能的子节点可能情况,然后求MST,memset()在POJ里面需要memory头文件。#include #include #include #include #include #inc...
分类:
其他 时间:
2014-08-18 18:30:52
收藏:
0 评论:
0 赞:
0 阅读:
382
cc.eventManager.addListener({ event: cc.EventListener.TOUCH_ALL_AT_ONCE, onTouchesMoved:function (touches, event) { ...
分类:
移动平台 时间:
2014-08-18 18:30:42
收藏:
0 评论:
0 赞:
0 阅读:
333
var browser={ ie6:function(){ return((window.XMLHttpRequest==undefined)&&(ActiveXObject!=undefined)) }, getWindow:function(){ v...
分类:
其他 时间:
2014-08-18 18:30:32
收藏:
0 评论:
0 赞:
0 阅读:
463
一:下载进入VirtualBox的下载地址:https://www.virtualbox.org/点击左侧的download,选择适合自己系统的版本,我的是红帽,故选择:进行下载。二:安装安装虚拟机(以root用户):三:运行VirtualBox:就会出现:可以正常使用啦!(*^__^*)嘻嘻……
分类:
系统服务 时间:
2014-08-18 18:30:22
收藏:
0 评论:
0 赞:
0 阅读:
373
php和其他语言语法上的一些区别1.php语言标记 在php.ini文件中将short_open_tag设置为on,php将会识别语言标记2.php语言注释 // # /* */ 多行注释3.可变变量4.字符串 5.面向对象的__get()和__set() __get($property...
分类:
Web开发 时间:
2014-08-18 18:30:02
收藏:
0 评论:
0 赞:
0 阅读:
353
1. [代码]jsi-rtree-library /****/package com.mycompany.project;//package net.sourceforge.jsi.examples;import java.util.ArrayList;import java.util.List;....
分类:
编程语言 时间:
2014-08-18 18:29:53
收藏:
0 评论:
0 赞:
0 阅读:
752
无论是ArrayAdapter还是SimpleAdapter都继承了BaseAdapter,自定义适配器同样继承BaseAdapter实例:Gallery实现图片浏览器 public class MainActivity extends Activity {private Gallery g...
分类:
移动平台 时间:
2014-08-18 18:29:42
收藏:
0 评论:
0 赞:
0 阅读:
301
曾经解析有规律的文件的时候要么用正則表達式,要么就是傻傻的自己敲代码来解析有规律的文件。今天突然发现c的库函数中有一个现成的能够解析有规律的文件的函数,就是fscanf()函数。哎 曾经自己做了这么多无用功,在这里具体解析一下fscanf函数:fscanf()函数(有点像正則表達式):功 能: 从一...
分类:
其他 时间:
2014-08-18 18:29:32
收藏:
0 评论:
0 赞:
0 阅读:
250
在 Windows Mobile Device Center 处点击 Mobile Device Settings, Connection Settings, 选择 This computer connects to => The Internet 按 [OK] 退出在 WM 设备上,设置 => 连...
分类:
Windows开发 时间:
2014-08-18 18:29:23
收藏:
0 评论:
0 赞:
0 阅读:
380
用JS来判断了,经过查找资料终于实现了效果,function is_weixn(){ var ua = navigator.userAgent.toLowerCase(); if(ua.match(/MicroMessenger/i)=="micromessenger") { return t...
分类:
微信 时间:
2014-08-18 18:29:12
收藏:
0 评论:
0 赞:
0 阅读:
454
Fragments 是android3.0以后添加的。主要是为了方便android平板端的开发。方便适应不同大小的屏幕。此代码是为了最简单的Fragment的使用,往一个Activity中添加Fragment,主要涉及的知识点有:1、Fragment类的创建,2、Fragment的添加3、无UI的 ...
分类:
移动平台 时间:
2014-08-18 18:28:53
收藏:
0 评论:
0 赞:
0 阅读:
432
需要用js获取滚动条距离窗口顶端的距离和js获取浏览器可视化窗口的大小一、jQuery获取的相关方法jquery 获取滚动条高度获取浏览器显示区域的高度 : $(window).height(); 获取浏览器显示区域的宽度 :$(window).width(); 获取页面的文档高度 :$(docum...
分类:
Web开发 时间:
2014-08-18 18:28:43
收藏:
0 评论:
0 赞:
0 阅读:
349
中方愿意同世界知识产权组织加强合作,推动国际知识产权规则朝着普惠、包容方向发展,让创新创造更多惠及各国人民。——7月11日,国务院总理李克在会见世界知识产权组织总干事高锐时指出。“知识产权法律制度的发展、完善,需要世界各国共同努力、协调。长期以来,中国与世界知识产权组织建立、保持了非常良好的合作关系...
分类:
其他 时间:
2014-08-18 18:28:32
收藏:
0 评论:
0 赞:
0 阅读:
293
DescriptionThe new principal of Woop Woop High is not satisfied with her pupils performance. She introduced a new roll-call process to get a daily mea...
分类:
其他 时间:
2014-08-18 18:28:22
收藏:
0 评论:
0 赞:
0 阅读:
462