摘要:
这个题目是大部分人都是用栈来写的,本周训练老师也讲了两次栈的原理。自己最近也看了数据结构中与栈有关的内容,还是比较深刻理解了没有括号情况下表达式求解。#include#include#includeusing namespace std;char s[250],post[250];/... 阅读全文
posted @ 2015-03-15 20:47
xryz
阅读(173)
评论(0)
推荐(0)
摘要:
题目看起来比较难,写起来比较简单。#include#include#includeusing namespace std;struct data{ char s[100]; int num;}a[25];bool cmp(data x,data y){ return x.num=1... 阅读全文
posted @ 2015-03-15 18:14
xryz
阅读(222)
评论(0)
推荐(0)
摘要:
#include#include#include#include#includeusing namespace std;struct data{ double j,f,x;}a[1024];bool cmp(data a,data b){ return a.x>b.x;}int main... 阅读全文
posted @ 2015-03-15 18:10
xryz
阅读(130)
评论(0)
推荐(0)