EOJ-2859 表达式的个数
摘要:
http://acm.cs.ecnu.edu.cn/problem.php?problemid=2859简单dfs。但花了比较大的精力去处理不添加符号的情况,求出所有的情况复杂度大概是8*3^8,最后用map匹配完成dfs遍历时存下添加符号的方法,到最终再计算处理会比较清晰。用hash可能更快。 1 #include<map> 2 #include<cmath> 3 #include<queue> 4 #include<cctype> 5 #include<cstdio> 6 #include<string> 7 #inc 阅读全文
posted @ 2013-06-09 23:22 KimKyeYu 阅读(322) 评论(0) 推荐(0) 编辑