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
一、索引视图基本概念 索引视图实际上是一种将一组唯一值“物化”为群集索引形式的视图,所为物化就是几乎和表一样,其数据也是会存储一份的(会占用硬盘空间,但是查询速度快,例如可以将count(),sum()等值设在索引视图中)。其优点是它在提取视图背后的信息方面提供了一个非常快的查找方法。在第一个索引....
分类:
数据库 时间:
2014-07-07 09:55:14
阅读次数:
212
#include#includeusing namespace std;int main(){ double i,n,t,a,b; double sum=0; cin>>n; a=2; b=1; for(i=0;i<n;++i){ sum+=double(a)/b; t=a; a=a+b; ...
分类:
其他好文 时间:
2014-07-07 09:24:16
阅读次数:
160
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
Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally i...
分类:
其他好文 时间:
2014-07-02 17:56:50
阅读次数:
205
The gray code is a binary numeral system where two successive values differ in only one bit.
分类:
其他好文 时间:
2014-07-02 14:47:43
阅读次数:
253
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