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
ajay_raj_:
20171120 15:32:17
Stack is required 

baraajaw97:
20171113 22:11:51
. 

sero:
20171028 17:52:25
What does AC mean ? :D


abdo_k009:
20171014 09:13:53
wrong answer !?


shikhars387:
20171008 05:50:31
Test cases are very weak!!


meet_1:
20170915 18:41:24
AC in one go !!!!! 

mahilewets:
20170912 21:27:55
Solved such problem even in my computer science class in university 

abhi_96:
20170722 13:22:56
a*(b+c) is a b c + *,but accepts abc+ also.weak test cases. 

nikkitricky:
20170720 11:27:54
AC in a go.. :D 

brodzik1337:
20170715 19:55:52
O(n) solution bois!!! 
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:   
Problem's scores 1 vote
Concept difficulty
Implementation difficulty
106
4