摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 const int nMax = 3000; 10 int A[nMax+1]; 11 int B[nMax+1];//用来每次5分法后保存要比较的值在A中的下... 阅读全文
posted @ 2018-06-10 20:38 myth_HG 阅读(1025) 评论(0) 推荐(0) 编辑
摘要: /*线性时间算法*/1 #include<iostream> 2 #include <stdio.h> 3 #include <stdlib.h> 4 #include <algorithm> 5 using namespace std; 6 #define NMax 10010 7 int A[N 阅读全文
posted @ 2018-05-20 17:32 myth_HG 阅读(170) 评论(0) 推荐(0) 编辑
摘要: #include #include#include#includeusing namespace std;const int maxN=200;char s1[maxN],s2[maxN];int a[maxN],b[maxN];int **ans=new int*[maxN];int ret[2*... 阅读全文
posted @ 2015-10-01 11:29 myth_HG 阅读(439) 评论(0) 推荐(0) 编辑
摘要: /*N!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 67077 Accepted Submission(s): 19228P... 阅读全文
posted @ 2015-09-30 11:56 myth_HG 阅读(234) 评论(0) 推荐(0) 编辑
摘要: /*Integer InquiryTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15874 Accepted Submission(... 阅读全文
posted @ 2015-09-29 19:40 myth_HG 阅读(292) 评论(0) 推荐(0) 编辑
摘要: /*Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. */#include #include#include#include#includeusing ... 阅读全文
posted @ 2015-09-26 13:55 myth_HG 阅读(242) 评论(0) 推荐(0) 编辑
摘要: /*Safe Or UnsafeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1816 Accepted Submission(s)... 阅读全文
posted @ 2015-09-25 09:43 myth_HG 阅读(252) 评论(0) 推荐(0) 编辑
摘要: /*Binary Tree TraversalsTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4644 Accepted Submi... 阅读全文
posted @ 2015-09-22 17:15 myth_HG 阅读(455) 评论(0) 推荐(0) 编辑
摘要: /*摘抄(简单贪心)FatMouse' TradeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33765 Accepted Submission(s): 10999Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorit.. 阅读全文
posted @ 2013-08-06 20:42 myth_HG 阅读(307) 评论(0) 推荐(0) 编辑
摘要: /*Doing Homework againTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4568 Accepted Submission(s): 2675Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him ... 阅读全文
posted @ 2013-08-06 20:03 myth_HG 阅读(295) 评论(0) 推荐(0) 编辑