- 博客(3)
- 收藏
- 关注
原创 N个元素入栈,第i+1个元素第j+1个出栈的出栈方案数量
#include<iostream>using namespace std;#define N 5 //N个元素int mul[2 * N] = { 1 }; //阶乘int sel[N][N];int arr[N][N]; //第i+1个元素第j+1个出栈的出栈方案数量int fun(int n, int i, int j) { int result = 0; for (int k = 0; k < i&&a.
2021-12-01 15:03:22
814
原创 求1-n中含有指定数字的数字个数
#include<iostream>using namespace std;#define N 5 int f(int n) { //求1-n中含有数字N的数字个数 int k = 0, h = 1, p1 = 0, p2 = 1; while (n >= (h * 10)) { h *= 10; } while (h&&n >= h) { if (n / h % 10 == N) {.
2021-11-06 12:53:02
473
2
原创 《数据结构课程设计》预习报告
#include<iostream>#include<fstream>#include<vector>#include<time.h>using namespace std;constexpr auto NUM = 5;int isRepeat(vector<vector<char>> WordList, vector<char> word) { for (int i = 0; i < WordLi...
2021-06-16 02:19:48
430
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人