#include #include #include #include #include using namespace std; #define MAXN 9999#define MAXSIZE 10#define DLEN 4class BigInt{ private: int a[50...
分类:
其他好文 时间:
2014-08-09 23:02:29
阅读次数:
431
import java.util.*;import java.math.*;import java.io.*;class Main{ public static void main(String[] args) { BigInteger[] ans = new BigInt...
分类:
其他好文 时间:
2014-08-09 18:40:58
阅读次数:
238
题目很简单:分析发现满足杨辉三角,有通项公式,但是是高精度,大数题目。
记录一个大数类模板:以后好用
代码:
#include
#include
using namespace std;
#define MAXN 9999
#define MAXSIZE 10
#define DLEN 4
class BigInt
{
private:
int a[500];
...
分类:
其他好文 时间:
2014-08-08 16:11:06
阅读次数:
279
有一个需求是要在一个云监控程序中存储状态值中存储多个状态(包括可同时存在的各种异常、警告状态)使用了位运算机制在一个int型中存储。现在监控日志数据量非常大(亿级别)需要对数据按每小时、每天进行聚合,供在线报表使用。状态分了3个级别:正常(0)、警告(1)、异常(2),聚合时需要使用max选择最差的...
分类:
数据库 时间:
2014-08-08 12:25:05
阅读次数:
564
模板很重要#include #include #include #include #include using namespace std; #define MAXN 9999#define MAXSIZE 10#define DLEN 4class BigInt{ private: int...
分类:
其他好文 时间:
2014-08-07 21:53:30
阅读次数:
334
-- sql语句耗时百分比declare @tmptb table(id int,name varchar(50),total_worker_time bigint,rate varchar(50),execute_count bigint);with cte1 as(select a.*,t.*f...
分类:
数据库 时间:
2014-08-07 21:52:00
阅读次数:
351
friend表结构
DROP TABLE IF EXISTS FRIEND;
create table friend(
uid bigint not null comment '用户标识',
friend_uid bigint not null comment '申请加为好友的用户标识',
sys_create_date datetime no...
分类:
数据库 时间:
2014-08-07 15:51:50
阅读次数:
272
1.unix时间戳转时间函数
语法: from_unixtime(bigint unixtime[, string format])
返回值: string
说明: 转化UNIX时间戳(从1970-01-01 00:00:00 UTC到指定时间的秒数)到当前时区的时间格式
举例:
hive> select from_unixtime(1323308943,‘yyyyMMdd’) from...
分类:
其他好文 时间:
2014-07-29 17:56:42
阅读次数:
434
1、使用正则表达式进行URL匹配urlpatterns = patterns('', # ... (r'^time/plus/\d+/$', hours_ahead), # ...)(1)使用r代表字符串是原始字符串,表示python不会对立面的反斜杠\转义符进行处理,使用正则表达...
分类:
编程语言 时间:
2014-07-22 22:45:15
阅读次数:
235
ThinkPHP支持URL路由功能,要启用路由功能,需要设置ROUTER_ON 参数为true。开启路由功能后,系统会自动进行路由检测,如果在路由定义里面找到和当前URL匹配的路由名称,就会进行路由解析和重定向。路由功能需要定...
分类:
Web程序 时间:
2014-07-22 00:14:33
阅读次数:
303