摘要: 此题是非常典型的表达式求值问题,既然只有最多15个变量,那就枚举每一种变量的取值代入计算,如果全部相等则认为两个表达式相等。View Code 1 #include <stdio.h> 2 3 char ve[500][50]; 4 long x[500],vnum,pfs,pf; 5 6 int tran(char c){ 7 8 if (c==')') 9 return 0; 10 11 if (c=='^') 12 return 1; 13 14 if (c=='|') 15 ... 阅读全文
posted @ 2012-03-14 13:09 ustc-acm 阅读(211) 评论(0) 推荐(0) 编辑