这题是今天下午BNU SUMMER TRAINING的C题是队友给的解题思路,用拓扑排序然后就可以了最后是3A其中两次RE竟然是因为:scanf("%d",mm);ORZ以后能用CIN还是CIN吧 QAQ贴代码了: 1 #include 2 #include 3 #include 4 #in...
分类:
其他好文 时间:
2014-08-04 23:57:48
阅读次数:
596
在使用order by排序的时候,出现如下情况: 印象中中文排序应该默认是按照拼音排序的,为何“鑫”会排在“中”的后面呢?猜想order by是不是根据对应字符的ASCII码排的呢,因此列出了对应的ASCII,如下: 由此基本可以断定,确实是通过ASCII的大小来排序的,这也解释了为什么数字会排在字...
分类:
数据库 时间:
2014-08-04 21:12:17
阅读次数:
287
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.方法:为了使BST高度平衡,要找链表中的中值作为当前根节点。/** * Defin...
分类:
其他好文 时间:
2014-08-04 20:37:47
阅读次数:
194
Description
N children are sitting in a circle to play a game.
The children are numbered from 1 to N in clockwise order. Each of them has a card with a non-zero integer on it in his/her hand. The ...
分类:
其他好文 时间:
2014-08-04 17:57:27
阅读次数:
284
Problem Description
Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to yo...
分类:
其他好文 时间:
2014-08-04 17:50:47
阅读次数:
158
Problem Description
In order to understand early civilizations, archaeologists often study texts written in ancient languages. One such language, used in Egypt more than 3000 years ago, is based on c...
分类:
其他好文 时间:
2014-08-04 11:03:57
阅读次数:
235
HDU 2276 Kiki & Little Kiki 2 (位运算+矩阵快速幂)
ACM
题目地址:HDU 2276 Kiki & Little Kiki 2
题意:
一排灯,开关状态已知,每过一秒:第i个灯会根据刚才左边的那个灯的开关情况变化,如果左边是开的,它就会变化,如果是关的,就保持原来状态。问m秒后的状态。
第1个的左边是最后一个。
分析:
转移不好...
分类:
其他好文 时间:
2014-08-04 02:03:26
阅读次数:
325
BME学习总结02 //查询数据库的SQL.XML order by OPER_ID desc ]]>
分类:
其他好文 时间:
2014-08-04 01:46:16
阅读次数:
443
子查询的位置: select 中、from 后、where 中.group by 和order by 中无实用意义。 子查询分为如下几类: 1,标量子查询:返回单一值的标量,最简单的形式。 2,列子查询:返回的结果集是 N 行一列。 3,行子查询...
分类:
数据库 时间:
2014-08-03 23:37:26
阅读次数:
962
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of the nodes in each of...
分类:
其他好文 时间:
2014-08-03 23:28:56
阅读次数:
261