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
wangyuxiangorz:
20200526 15:25:01
AC in 1 go! yay! 

adityaguptagkp:
20200520 22:12:14
ac in one go...


sacsachin:
20200512 06:06:28
AC in one go :) 

dassatyaki:
20200507 18:07:04
Use stack.


amit_dubey99:
20200506 14:25:30
so freakin easy! AC in one GO! 

pharoaheye:
20200430 13:38:44
Ac in one go .... so easy


sakibmalik:
20200420 08:37:40
Used wrong language for submitting, otherwise first time AC and even that in less than 15 min. 

demonhue:
20200321 15:25:43
didn't know how to solve using stacks so solved using vector pair ;) 

ariestaheart:
20200309 08:26:19
Ching Cheng HanJi 

shafiul_sumon:
20200303 11:55:03
nice one :) Last edit: 20200303 11:56:29 
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
253
7