ArrayString

quoc14 avatarquoc14
Public08/25/2024 7:42 AM3 snippets
Tientohautopheptinh.cpp
ZERO-ONE-TWO.cpp
Password.cpp

Tientohautopheptinh

08/25/2024 7:46 AM
Tientohautopheptinh.cpp
[Problem]

Create a program which converts a character string of calculation formula to a postfix expression and calculates it.

 

For example, a character string “3+(4+5)*6+7” can be converted to a postfix expression "345+6*+7+".

The calculation should yield 64.

ZERO ONE TWO

08/25/2024 7:45 AM
ZERO-ONE-TWO.cpp
 

Steve, who is lazy and an expert of petty tricks, is annoyed of having to memorize the passwords. He may carry a memo, but it may be exposed to others. So, he thought of an idea.

 

He will create a password with the remaining numbers after removing the pairs of same numbers from a number string consisting of numbers 0~9. After removing the same number pairs, he can also remove the number pairs whose right and left numbers are the same. Following example shows the password from a number string after removing the applicable number pairs.  

[Input]

Password

08/25/2024 7:43 AM
Password.cpp
 

Steve, who is lazy and an expert of petty tricks, is annoyed of having to memorize the passwords. He may carry a memo, but it may be exposed to others. So, he thought of an idea.

 

He will create a password with the remaining numbers after removing the pairs of same numbers from a number string consisting of numbers 0~9. After removing the same number pairs, he can also remove the number pairs whose right and left numbers are the same. Following example shows the password from a number string after removing the applicable number pairs.  

[Input]