1 #include 2 #include 3 using namespace std; 4 int main(){ 5 int m,n,c=0,sum=0; 6 cin>>m>>n; 7 while(m<=n){ 8 if(c&&c%5==0) 9 ...
分类:
其他好文 时间:
2014-07-07 12:35:43
阅读次数:
253
1 #include 2 using namespace std; 3 int sum(int n){ 4 if(n==1||n==2) 5 return 1; 6 else 7 return sum(n-1)+sum(n-2); 8 } 9 int...
分类:
其他好文 时间:
2014-07-07 10:45:18
阅读次数:
188
1 #include 2 using namespace std; 3 int u,d; 4 int sum(int t){ 5 if(t%2==0) 6 return (u-d)*t/2; 7 else 8 return u*(t/2+1)-d*t...
分类:
其他好文 时间:
2014-07-07 10:15:59
阅读次数:
168
1089:Intervals总时间限制: 1000ms 内存限制: 65536kB描述There is given the series of n closed intervals [ai; b i], where i=1,2,...,n. The sum of those intervals ma...
分类:
其他好文 时间:
2014-07-02 20:39:31
阅读次数:
236
一般情况下是SQL语句:Select * From Users Where UserName Like 'Lin%'Select * From Users Where UserName Like 'Lin%'采用参数化SQLDECLARE @pattern VARCHAR(MAX)SET @patt...
分类:
数据库 时间:
2014-07-02 20:34:52
阅读次数:
287
ProjectEuler// 001 1 #include 2 3 using namespace std; 4 5 int main() 6 { 7 int sum = 0; 8 for (int i = 3; i 2 3 using namespace std; 4 ...
分类:
其他好文 时间:
2014-07-02 14:40:32
阅读次数:
232
给一个图,问至少添加多少条有向边可以使图变成强连通的。
原图是有环的,缩点建图,在该DAG图上我们可以发现,要使该图变成强连通图必须连成环
而添加最少的边连成环,就是把DAG图上入度为0和出度为0的点连上,那么其他的点就都可以互相到达了
所以答案就是max(入度为0的点,出度为0的点)
#include
#include
#include
#include
#include...
分类:
其他好文 时间:
2014-07-02 10:52:24
阅读次数:
208
题目链接:点击打开链接
溢出了半天,觉累不爱
#include
#include
using namespace std;
#define ll int
int main(){
ll Cas= 1, T; cin>>T;
while(T--){
ll n;
cin>>n;
double sum = 0, a;
double hehe = 0;
for(ll i =...
分类:
其他好文 时间:
2014-07-02 09:43:47
阅读次数:
201
测试参数:sysbench--test=/root/sysbench0.5/sysbench/tests/db/insert.lua
--mysql-table-engine=innodb--oltp-table-size=1000000
--max-requests=0--max-time=300--num-threads=16
--oltp-tables-count=10--report-interval=10
--mysql-host=10.8.8.100--mysql-port=3312--..
分类:
数据库 时间:
2014-07-02 06:44:36
阅读次数:
280
Math对象:该对象提供了大量的数学常量和数学函数。使用Math对象时,不应该使用new关键字创建对象,而应直接使用。如:Math.PI;例子:随机产生指定位数的验证码Number对象的创建:1.varnum=newNumber(object);2.varnum=Number(object);Number对象的属性:1.MAX_VALUE属性2.MIN_..
分类:
编程语言 时间:
2014-07-02 06:23:05
阅读次数:
285