数据结构:堆的基本操作 摘要:int heap[N],n,sizea; //向下 void down(int k) { int t=k; // 注意最后比较要用heap[t] if(2*k<=…… 文章列表 2023年07月31日 0 点赞 0 评论 91 浏览 评分:9.9
数据结构:哈希表:拉链法 摘要://初始化 int h[N],e[N],ne[N],idx; //插入元素 void insert(int x) { int k=(x%N+N)%N //保证k为正数 …… 文章列表 2023年07月31日 0 点赞 0 评论 139 浏览 评分:9.9
STL(acwing)(简易) 摘要:pair<int, int> first, 第一个元素 second, 第二个元素 支持比较运算,以first为第一关键字,以second为第二关键字(字典序) s…… 文章列表 2023年08月01日 0 点赞 0 评论 152 浏览 评分:9.9
全排列(dfs)(acwing) 摘要:#include<iostream> using namespace std; const int N=10010; int path[N],n; bool st[N]; //用来判断有…… 文章列表 2023年08月01日 0 点赞 0 评论 99 浏览 评分:9.9
x皇后(dfs)(acwing) 摘要:#include<iostream> using namespace std; const int N=10010; int n; char path[N][N]; bool …… 文章列表 2023年08月01日 0 点赞 0 评论 109 浏览 评分:9.9
大连交通大学五年制C语言试卷一 考试笔记 摘要:2、若以下变量均是整型,且num=sum=7;则计算表达式sum=num++,sum++,++num后sum的值为( )。正确答案:A A.7 B.8 C.9 …… 文章列表 2023年08月01日 0 点赞 0 评论 359 浏览 评分:9.9
迷宫(bfs)(queue)(acwing) 摘要:#include<iostream> #include<cstring> #include<queue> #include<algorithm> using namespace std; t…… 文章列表 2023年08月01日 0 点赞 0 评论 148 浏览 评分:9.9
大连交通大学五年制C语言试卷二 考试笔记 摘要:5、执行语句for(i=1;i++<4;);后变量i的值是( )。正确答案:B A.7 B.8 C.9 D.10【解析】: 文章列表 2023年08月01日 0 点赞 0 评论 272 浏览 评分:0.0
大连交通大学五年制C语言试卷四 考试笔记 摘要:4、以下程序输出的是:( )(答案中用大写字母U代表空格)。正确答案:Cvoid main() { int a=-1,b=4,k; k=(a++<=0)&&(!(b--<=0))…… 文章列表 2023年08月01日 0 点赞 0 评论 257 浏览 评分:0.0
大连交通大学五年制C语言试卷五 考试笔记 摘要:2、字符串"\"ABC"\"所占内存字节的长度是( )。正确答案:B A. 11 B. 8 B. 5 B. 7【解析】:\,",A,B,C,",\,\0共8个字节长度。3、用scan…… 文章列表 2023年08月02日 0 点赞 0 评论 372 浏览 评分:9.9