题目一:求1!+2!+…..+n! 的和的后6位,(注意n的范围)#include using namespace std;const int MAX = 1000000;int getResu(int n){ int sum=0; int temp= 1; for(int i=1; i >n) {...
分类:
其他好文 时间:
2014-06-27 13:47:37
阅读次数:
161
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
分类:
其他好文 时间:
2014-06-27 12:52:03
阅读次数:
213
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of ...
分类:
其他好文 时间:
2014-06-27 12:27:28
阅读次数:
169
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
分类:
其他好文 时间:
2014-06-27 11:43:25
阅读次数:
173
设 $f(x)$ 二阶连续可导, $f(0)=f(1)=0$, $\dps{\max_{0\leq x\leq 1}f(x)=2}$. 证明: $$\bex \min_{0\leq x\leq 1}f''(x)\leq -16. \eex$$证明: 设 $$\bex \xi\in (0,1),\st...
分类:
其他好文 时间:
2014-06-27 11:09:41
阅读次数:
245
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int MAX=111111;
int N,E;
int v[MAX];
const int MINF=-210000000;
int in[MAX],out[MAX];
int dp[...
分类:
其他好文 时间:
2014-06-27 10:50:20
阅读次数:
155
还不算是难题(嘿嘿,因为我做出来了)
很简单,找到相应的方程式解就是了(中间也犯了一个很2的错误,把9+10+11+...+99写成(1+90)*90/2,改过来后就好了)
不多说,code is below
#include
#include
#include
using namespace std;
int combi(int a,int b)
{
int sum=1;
int...
分类:
其他好文 时间:
2014-06-27 10:45:32
阅读次数:
193
Given a binary tree containing digits from 0-9 only, each root-to-leaf
path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find the tota...
分类:
其他好文 时间:
2014-06-27 09:53:29
阅读次数:
208
。。。第一个网络流的题目
牛淋雨什么的,建图,用模板之
#include
#include
#include
#include
#include
#include
#include
using namespace std;
long long F,P;
long long cowsum;
const int MAX=555;
long long tttt=(1<<31)-1;
c...
分类:
其他好文 时间:
2014-06-27 08:09:06
阅读次数:
178
有工具在手,这题就是一个模板题,就是有点不清楚,最后问的是单个元素的值,它怎么sum求出来的
#include
#include
#include
#include
using namespace std;
#define maxn 1005
int c[maxn][maxn];
int Row, Col;
inline int Lowbit(const int &x)
{
...
分类:
其他好文 时间:
2014-06-27 07:38:00
阅读次数:
281