随笔分类 -  Data Structure

摘要:http://www.spoj.pl/problems/ONP/Transform the algebraic expression with brackets into RPN form (Reverse Polish Notation). Two-argument operators: +, -, *, /, ^ (priority from the lowest to the highest), brackets ( ). Operands: only letters: a,b,...,z. Assume that there is only one RPN form (no expre 阅读全文
posted @ 2012-06-03 15:30 漂木 阅读(315) 评论(0) 推荐(0)
摘要:只写了加减,乘除不太明白T_T..弄明白补上。 1 #include <stdio.h> 2 #include <string.h> 3 4 #define MAX 1000 5 6 void Add(char *str1,char *str2, char *str3); 7 void Minus(char *str1, char *str2, char *str3); 8 void Times(char *str1, char *str2, char *str3); 9 10 int main(void) 11 { 12 char str1[MAX], str... 阅读全文
posted @ 2012-02-15 16:33 漂木 阅读(203) 评论(0) 推荐(0)