摘要: 思路:当时学长讲了之后,似乎有点思路----------就是倒着建一个 二叉搜索树代码1:超时详见超时原因#include#include#includeusing namespace std;char c[100][100];struct node{ char c; node *lchild; n... 阅读全文
posted @ 2014-08-04 17:28 gongpixin 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 看到网上的说是,右结合但是还是从左往右算// 以下说法是从网上看的,不知道对不a ? b : c ? d : e 如何进行呢?它的结合律是从右向左,所以它等效于 a ? b : ( c ? d : e )运算还是从左向右,所以先判断a,cde都可能不会被算到。运算只会从左向右,不存在从右向左。除非有... 阅读全文
posted @ 2014-08-04 15:29 gongpixin 阅读(687) 评论(0) 推荐(0) 编辑
摘要: 运算顺序有关,详见运算符优先级代码1:#includeusing namespace std;int main(){ char c; int m=0; while( c= getchar(c) &&c!='\n') { m++; coutusing namespace std;int main(... 阅读全文
posted @ 2014-08-04 15:13 gongpixin 阅读(411) 评论(0) 推荐(0) 编辑