大连交通大学五年制C语言试卷二 考试笔记 摘要:5、执行语句for(i=1;i++<4;);后变量i的值是( )。正确答案:B A.7 B.8 C.9 D.10【解析】: 文章列表 2023年08月01日 0 点赞 0 评论 343 浏览 评分:0.0
迷宫(bfs)(queue)(acwing) 摘要:#include<iostream> #include<cstring> #include<queue> #include<algorithm> using namespace std; t…… 文章列表 2023年08月01日 0 点赞 0 评论 220 浏览 评分:9.9
大连交通大学五年制C语言试卷一 考试笔记 摘要:2、若以下变量均是整型,且num=sum=7;则计算表达式sum=num++,sum++,++num后sum的值为( )。正确答案:A A.7 B.8 C.9 …… 文章列表 2023年08月01日 0 点赞 0 评论 478 浏览 评分: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 评论 191 浏览 评分: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 评论 167 浏览 评分:9.9
STL(acwing)(简易) 摘要:pair<int, int> first, 第一个元素 second, 第二个元素 支持比较运算,以first为第一关键字,以second为第二关键字(字典序) s…… 文章列表 2023年08月01日 0 点赞 0 评论 230 浏览 评分: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 评论 190 浏览 评分:9.9
数据结构:堆的基本操作 摘要:int heap[N],n,sizea; //向下 void down(int k) { int t=k; // 注意最后比较要用heap[t] if(2*k<=…… 文章列表 2023年07月31日 0 点赞 0 评论 157 浏览 评分:9.9
计算分数加减法表达式的值 学到的好方法 摘要:#include<stdio.h>int main(){ int i,j; int sign = 1; double sum = 0; scanf("%d",&j); for(i = 1;…… 文章列表 2023年07月28日 0 点赞 0 评论 231 浏览 评分:9.9
单调栈(找出一个数左边离它最近的且比它小的元素) 摘要:#include<iostream> using namespace std; const int N=100010; int stk[N]; int tt=0; int main(void…… 文章列表 2023年07月28日 0 点赞 0 评论 225 浏览 评分:9.9