文章列表
最长上升子序列(动态规划)
摘要:##最长上升子序列
最长上升子序列意思是,在一个数组中,找出上升单元的最大长度。
举个例子:
1 7 3 5 4 7 6 8 10
它的上升子序列长度为:1 3 4 6 8 10,……
1033 题 ,我写的错%50,如何优化呢??
摘要:#include
#include
using namespace std;
int main()
{
char c;
int i,n;
char a[5],b[5];
……
1031 为什么输出超限???
摘要:#include
using namespace std;
int inverseAraay(int n)
{
int i;
char a[n];
for(int i=0;i>a[……
1027 为啥错误??
摘要:#include
using namespace std;
int m,n;
int MaxGB(int m,int n)
{ int R=1;
if(m>n)
{
while(R!……
区间调度问题的贪心策略
摘要:感觉很久没正儿八经的写博客了,所以今天打算开始写一篇,今天准备的话题是区间调度问题的贪心策略
------------
贪心策略的原理不难,但是要想构思出一个正确无误的策略并不是很容易……
1024题,运行错误? 错误在哪呢?
摘要:#include
using namespace std;
int main()
{
int i,j,n,sum=0;
//cin>>n;
int a[2][2];
fo……
1012为什么时间超限?????
摘要: #include
using namespace std;
int main()
{
char c;
int cNum=0;
int bkNum=0;
i……