查整个库的状态:select concat(truncate(sum(data_length)/1024/1024,2),'MB') as data_size, concat(truncate(sum(max_data_length)/1024/1024,2),'MB') as max_data_s...
分类:
数据库 时间:
2014-07-03 10:35:52
阅读次数:
314
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2014-07-02 22:34:44
阅读次数:
318
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他好文 时间:
2014-07-02 22:10:42
阅读次数:
262
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-07-02 21:13:05
阅读次数:
170
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
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
题目链接:点击打开链接
溢出了半天,觉累不爱
#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
766 - Sum of powers
题意:求 转化成 的各系数
思路:在wiki看了伯努利数的性质,
可以推成 。
然后B为伯努利数,有公式,
如此一来就可以去递推求出每项伯努利数了,然后在根据n去通分,求出每一项的答案,中间过程用到了分数的运算。
代码:
#include
#include
long long gcd(l...
分类:
其他好文 时间:
2014-07-02 08:46:49
阅读次数:
339
Block 、数组高级block本质上就是匿名函数(没有名称的函数)block语法和函数指针很相似回顾函数函数:C语?中,实现某一类功能的代码段。完整的函数包含两部分:函数声明、函数定义函数声明,即函数原型。例如:int sum(int x,int y);具有两个整型参 数,一个整型返回值的函数。函...
分类:
移动开发 时间:
2014-07-01 18:04:45
阅读次数:
243
题目poj题目zoj//我感觉是题目表述不确切,比如他没规定xi能不能重复,比如都用1,那么除了0,都是YES了//算了,这种题目,百度来的过程,多看看记住就好//题目意思:判断一个非负整数n能否表示成几个数的阶乘之和//这里有一个重要结论:n!>(0!+1!+……+(n-1)!),//证明很容易,...
分类:
其他好文 时间:
2014-07-01 17:58:54
阅读次数:
289