I am a slow walker,but I never walk backwards. Abraham Lincoln

GeekZRF

2017年4月6日

表达式计算

摘要: 计算一个包含+ - * / ( ) 的合法表达式的值 思路:数字栈num,运算符栈op。当前操作符优先级不大于栈顶操作符优先级,则数字栈num和运算符栈op出栈,处理后的数字和当前运算符继续与栈顶操作符比较,直至当前运算符的优先级大于栈顶,处理后的数字和当前运算符入栈。 代码: 阅读全文

posted @ 2017-04-06 20:05 GeekZRF 阅读(151) 评论(0) 推荐(0) 编辑

Codeforces 545E. Paths and Trees 最短路

摘要: E. Paths and Trees time limit per test: 3 seconds memory limit per test: 256 megabytes input: standard input output: standard output Little girl Susie 阅读全文

posted @ 2017-04-06 17:24 GeekZRF 阅读(374) 评论(0) 推荐(0) 编辑

导航