stack_STL + 详细注释#1683: 数据结构-表达式求值(C++) 摘要:``` #define _CRT_SECURE_NO_WARNINGS 1 #include #include #include #include #include #include …… 题解列表 2024年11月26日 2 点赞 0 评论 350 浏览 评分:2.0
约瑟夫环问题的解答 摘要:解题思路:模拟or递归(这里解题基于我的代码)注意事项:1.使用模拟的话 一定要注意报数是迟于检查的 所以初始化count=1;每次元素退场后都需要初始化count=1. …… 题解列表 2024年11月26日 1 点赞 0 评论 448 浏览 评分:10.0
求矩阵的两对角线上的元素之和(新手版本) 摘要:解题思路:代码较多,但都很基础,看不懂私聊注意事项:参考代码:#include <stdio.h>int main(){ int N; scanf("%d",&N); int arr[N][N]; i…… 题解列表 2024年11月26日 1 点赞 0 评论 465 浏览 评分:0.0
送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a[150]; int i; gets(a); for(i=0;a[i]!=0…… 题解列表 2024年11月26日 0 点赞 0 评论 338 浏览 评分:0.0
用数组模拟栈,详细注释#3071: 表达式括号匹配(stack) (c++) 摘要:通过观察规律发现,最后出现的左括号最先被匹配 遇到左括号入栈 遇到右括号出栈进行匹配,如果此时栈空,则匹配失败,如果匹配不上,则匹配失败 如果扫描完序列后栈不为空,则匹配失败 ``…… 题解列表 2024年11月26日 0 点赞 0 评论 363 浏览 评分:0.0
比较简单的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n,a=1,b=1,c=1; scanf("%d",&n); for(i=3;i<…… 题解列表 2024年11月26日 2 点赞 0 评论 629 浏览 评分:10.0
超级超级超级简单的数组排除 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a[81]; gets(a); for(int i=0;a[i]!='\0';i++)…… 题解列表 2024年11月26日 0 点赞 0 评论 259 浏览 评分:0.0
数组的插入处理 摘要:解题思路:用到了冒泡排序和数组插入注意事项:参考代码:#include <stdio.h>#include <string.h>void swap(int *a,int *b){ int tmp=*a…… 题解列表 2024年11月26日 0 点赞 0 评论 522 浏览 评分:0.0
用数学方法和for循环来解此题(ceil函数:向上取整,如6.5→7,且记得循环一次换行一次) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int i,n,N; double x,y,s,t; scan…… 题解列表 2024年11月26日 0 点赞 0 评论 270 浏览 评分:0.0
送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c=0,d=0,e=0; scanf("%d",&a); while(a) …… 题解列表 2024年11月26日 0 点赞 0 评论 266 浏览 评分:0.0