ONP - Transform the Expression
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 expressions like a*b*c).
t [the number of expressions <= 100] expression [length <= 400] [other expressions]
Text grouped in [ ] does not appear in the input file.
The expressions in RPN form, one per line.
Input: 3 (a+(b*c)) ((a+b)*(z+x)) ((a+t)*((b+(a+c))^(c+d))) Output: abc*+ ab+zx+* at+bac++cd+^*
AC in one go, took 0.07 sec!!
Not enough tricky cases.
Accepted in one go , 0.00 in cpp 14 , it's just a direct implementation of Shunting yard algorithm ( from infix to postfix).
AC in one go,also take 0.00 sec
AC means accepted guys!!
What is mean by AC??
yayayay....AC in one go...too happy...did it without stack, was on my todo list for a long time.....my 103rd!!!!!!!!!
Very weak test cases...I realized after 3 months that my solution was wrong.
Very weak testcases :/
|Cluster:||Cube (Intel G860)|
|Languages:||All except: NODEJS PERL6 VB.NET|