- 博客(10)
- 收藏
- 关注
原创 圈乘运算问题
思路源于Will_Lee_Buaa#include using namespace std;int NumLen(int x){//统计位数 int len = 0; while (x>0){ len++; x /= 10; } return len;}void Init(int* a, int x){//作初始化 int min = 10; int max =
2015-10-29 09:11:22 2653
原创 词法分析ver1.0
int main(){int a/*hehe*/=100;//heheint b=100;int c;/*#include #include #include using namespace std;#define _RESERVE_NUM 37#define _DELIMILTER_NUM 26string key[_RESERVE_NUM] = {//关键字表
2015-10-28 09:05:04 405
转载 最小m段和
#include using namespace std;int main(){ int n = 9; int m = 3; int arr[] = { 9, 8, 7, 6, 5, 4, 3, 2, 1 }; int **r = new int*[n]; for (int i = 0; i < n; i++){ r[i] = new int[m](); } r[0][0]
2015-10-22 18:11:49 395
原创 带方向性全排列
#include using namespace std;typedef struct{ int value; int fangxiang;//-1}number;void swap(number* arr, int n,int j){//arr为数组的指针,n为总个数,j为要交换的位置 number* p=arr; number temp = arr[j+arr[j].fang
2015-10-19 20:40:14 283
原创 独立任务最优调度
#include using namespace std;int main(){ int n = 6;//15 int a[] = {2,5,7,10,5,2}; int b[] = {3,8,4,11,3,4}; int sum = 0; for (int i = 0; i < n; i++){ sum += a[i]; } int** m = new int*[n];
2015-10-19 11:28:24 553
原创 石子合并问题
#include using namespace std;int main(){ int n = 4; int arr[] = { 4, 4, 5, 9 }; int **sums = new int*[n];//记录从第i个到i+j个的最后一次的分数 for (int i = 0; i < n; i++){ sums[i] = new int[n](); } int **m
2015-10-19 11:26:09 280
原创 编辑距离问题
#include using namespace std;int main(){ char A[] = "fxpimu"; char B[] = "xwrs"; int lena = strlen(A); int lenb = strlen(B); int **m = new int*[lena+1]; for (int i = 0; i <= lena; i++){ m[i]
2015-10-17 18:20:35 329
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人