ONP  Transform the Expression
Transform the algebraic expression with brackets into RPN form (Reverse Polish Notation). Twoargument operators: +, , *, /, ^ (priority from the lowest to the highest), brackets ( ). Operands: only letters: a,b,...,z. Assume that there is only one RPN form (no expressions like a*b*c).
Input
t [the number of expressions <= 100] expression [length <= 400] [other expressions]
Text grouped in [ ] does not appear in the input file.
Output
The expressions in RPN form, one per line.
Example
Input: 3 (a+(b*c)) ((a+b)*(z+x)) ((a+t)*((b+(a+c))^(c+d))) Output: abc*+ ab+zx+* at+bac++cd+^*
hide comments
charlles:
20190409 16:14:58
there is an recursive solution to it? 

stones:
20190325 19:17:28
AC in One go :P 

mohanteja1:
20190216 12:37:43
solved this with recursion 

lnediak:
20190127 21:01:15
lol I did rly stupid i didn't use stack i created dumb token class and separate on operator but it works anyways i think maybe logn times slower than stack 

traitorakali:
20190108 07:16:03
Why I keep geting runtime error (NZEC) ? 

karankeswani99:
20190107 18:58:28
Just use stack


rajulrs13:
20181230 22:10:19
got me stuck for an hour because I took expression length to be 100.. : ( 

dhuruvapriyan:
20181224 15:46:52
Last edit: 20181224 15:47:23 

sehgal_divij:
20181223 13:12:22
Why would my code take 16M Memory to execute?


cypher33:
20181219 12:21:17
Got it 
Added by:  mima 
Date:  20040501 
Time limit:  5s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: NODEJS PERL6 VB.NET 
Resource:   