Consider integer numbers from 1 to n. Let us call the sum of digits of an integer number its weight. Denote the weight of the number x as w(x).
Now let us order the numbers using so called graduated ...
分类:
其他好文 时间:
2014-08-10 18:47:20
阅读次数:
406
http://zhanghong.iteye.com/blog/8659371. 首先创建数据库表SQL> create table customer(2 id number(8) not null primary key,3 name varchar2(20),4 age number(3),5 ...
分类:
数据库 时间:
2014-08-10 18:01:30
阅读次数:
251
题意:
一个含n个数的序列a,每两个相邻的数相减得到一个新数,这些数组成一个新的序列。
如果所有得到的序列都满足非严格的单调性,则原序列为nice series;如果给出的序列
本来不满足单调性,它是ugly series。否则输出k,表示前k个序列都满足单调性,第k+1不满足。
算法:
模拟合并和判断单调性,如果不优化会Tle.
如果去掉前导0和后导0,因为0-0还是0,省去...
分类:
其他好文 时间:
2014-08-10 15:48:40
阅读次数:
186
UVA 11651 - Krypton Number System
题目链接
题意:给一个进制base,一个分数score求该进制下,有多少数满足一下条件:
1、没有连续数字
2、没有前导零
3、分数为score,分数的计算方式为相邻数字的平方差的和
思路:先从dp入手,dp[i][j]表示组成i,最后一个数字为j的种数,然后进行状态转移,推出前面一步能构成的状态,也就是到...
分类:
其他好文 时间:
2014-08-10 13:06:10
阅读次数:
223
1,使用 mysqlslap 进行压力测试
mysqlslap --defaults-file=/etc/my.cnf --concurrency=200 --iterations=1 --number-int-cols=1 --auto-generate-sql --auto-generate-sql-load-type=write --engine=myisam,innodb --n...
分类:
数据库 时间:
2014-08-10 13:06:00
阅读次数:
368
/**
* 功能:内存存放地址的地方
* 时间:2014年7月31日09:50:10
* 作者:cutter_point
*/
#include
using namespace std;
//全局变量的存放地点
int dog, cat, bird, fish;
//函数存放内存地点
void f(int pet)
{
cout<<"pet id number: "<<pet<<e...
分类:
编程语言 时间:
2014-08-10 13:05:40
阅读次数:
249
枚举支点,然后就搞,记录之前的点的力矩和。#include #include #include #include #include #include #include #include #include #include #include #include #includeusing namespa...
分类:
其他好文 时间:
2014-08-09 23:08:59
阅读次数:
219
就是记个余数然后像不要62那样搞#include #include #include #include #include #include #include #include #include #include #include #include #includeusing namespace st...
分类:
其他好文 时间:
2014-08-09 23:08:39
阅读次数:
246
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.思路:对于两个点(x1,y1)和(x2,y2),其所确定的直线方程为:(x1-x2)*y + (y2-...
分类:
其他好文 时间:
2014-08-09 23:03:49
阅读次数:
317
KiKi's K-Number
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2546 Accepted Submission(s): 1174
Problem Description
For the k-th...
分类:
其他好文 时间:
2014-08-09 21:34:59
阅读次数:
264