摘要:
# 6-1 用顺序栈实现将非负的十进制数转换为指定的进制数 这个其实就是每次把余数放进栈中就好了 ```c int DecimalConvert(SqStack *s, int dec, int scale){ InitSqStack( s ); while( dec ){ SqStackPush( 阅读全文
摘要:
A - 484558 十进制转十六进制,签到题 #include<bits/stdc++.h> #define int long long using namespace std; int read(){ int x = 0 , f = 1 , ch = getchar(); while( (ch 阅读全文
摘要:
A - Integer Sum 签到题,求和就好 #include<bits/stdc++.h> using namespace std; int read() { int x = 0, f = 1, ch = getchar(); while ((ch < '0' || ch > '9') && 阅读全文
摘要:
棋盘问题 这题就是简单的搜索,类似八皇后问题,dfs 枚举每一行放在哪里一列,或者不放。在枚举的过程中直接筛掉之前放过的列。 #include <string> #include <iostream> using namespace std; int n , m , res; bool v[15]; 阅读全文
摘要:
# **6-1 顺序表实现** ```cpp int ListLength(SqList L){ return L.length; } int LocateElem(SqList L , ElemType e , Status (*compare)(ElemType , ElemType) ){ / 阅读全文