表达式括号匹配(stack),来看看吧,不用栈写法 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义一个字符串变量ch,用于存储输入的字符串 string ch; …… 题解列表 2024年11月24日 0 点赞 0 评论 620 浏览 评分:0.0
状态机模型DP #3067: 大盗阿福(C++) #大盗阿福N家店铺同时偷两家报警系统会启动不惊动警察的情况下,最多可以得到多少现金**状态:**对于当前店铺[偷|不偷]**状态定义:**f[i]表示考虑前i家店铺的情况下得到的最大金额数量**状态计算:**当前店铺i偷f[i]=f[i-2]+a[i]当前店铺i不偷f[i]=f[i-1]`f[i]=m 题解列表 2024年11月25日 0 点赞 0 评论 463 浏览 评分:0.0
数单词?数空格! 摘要:解题思路:空格的格数加一就是单词数注意事项:gets危险 所以用getline fgets也行参考代码:#include <iostream>using namespace std;int main(…… 题解列表 2024年11月25日 1 点赞 0 评论 494 浏览 评分:0.0
编写题解 3029: 逆波兰表达式 摘要:inver = input().split() inver = inver[::-1] def arithmetic(inver): if inver: alphabe…… 题解列表 2024年11月25日 0 点赞 0 评论 456 浏览 评分:0.0
括弧匹配检验,栈栈栈 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义一个字符栈,用于存储括号 stack<char> st; in…… 题解列表 2024年11月25日 0 点赞 0 评论 514 浏览 评分:0.0
字符串匹配问题(strs),写吐了呀 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义一个字符数组,包含所有括号和尖括号的符号 char ss[10]…… 题解列表 2024年11月26日 0 点赞 0 评论 486 浏览 评分:0.0
送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int max=0,min=1000,a,b; scanf("%d",&a); while(a…… 题解列表 2024年11月26日 0 点赞 0 评论 445 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,a,b,c,d,e=0,f=0,g=0; scanf("%d",&a); whil…… 题解列表 2024年11月26日 1 点赞 0 评论 475 浏览 评分:0.0
送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,a,b,p=0,q=0,sum=0; scanf("%d %d",&a,&b); …… 题解列表 2024年11月26日 0 点赞 0 评论 603 浏览 评分: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 评论 481 浏览 评分:0.0