![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法初步
BinHow
这个作者很懒,什么都没留下…
展开
-
简易计算器
title: 简易计算器 grammar_cjkRuby: true 一 问题 题目描述 读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 输入 测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。 输出 对每个测试用例输出1行,即该表达式的值,精确...原创 2019-03-23 18:28:48 · 189 阅读 · 0 评论 -
背包问题——dfs
问题描述 解决思路 采用DFS搜索 其实也是回溯法 代码实现 #include<iostream> #include<vector> using namespace std; struct goods { int w; int v; int flag; }; vector<goods> g; vector<goods> result; ...原创 2019-03-27 20:53:29 · 286 阅读 · 0 评论