摘要: 魔兽世界的西面是红魔军的司令部,东面是蓝魔军的司令部。两个司令部之间是依次排列的若干城市。 红司令部,City 1,City 2,……,City n,蓝司令部 两军的司令部都会制造武士。武士一共有 dragon 、ninja、iceman、lion、wolf 五种。每种武士都有编号、生命值、攻击力这 阅读全文
posted @ 2016-01-19 09:29 Miller_S 阅读(1455) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,00 阅读全文
posted @ 2016-01-16 21:53 Miller_S 阅读(392) 评论(0) 推荐(0) 编辑
摘要: 当时第一次看这到这个公式的时候反应是DP(我真是好久没做DP了) 后来发现原来这就是bfs的精髓 阅读全文
posted @ 2016-01-15 13:20 Miller_S 阅读(413) 评论(0) 推荐(0) 编辑
摘要: Description GeoSurvComp地质调查公司负责探测地下石油储藏。 GeoSurvComp现在在一块矩形区域探测石油,并把这个大区域分成了很多小块。他们通过专业设备,来分析每个小块中是否蕴藏石油。如果这些蕴藏石油 的小方格相邻,那么他们被认为是同一油藏的一部分。在这块矩形区域,可能有很 阅读全文
posted @ 2016-01-11 20:34 Miller_S 阅读(1260) 评论(0) 推荐(0) 编辑
摘要: Write a SQL query to find all numbers that appear at least three times consecutively. For example, given the above Logs table, 1 is the only number th 阅读全文
posted @ 2016-01-05 15:46 Miller_S 阅读(308) 评论(0) 推荐(0) 编辑
摘要: Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. For example, aft 阅读全文
posted @ 2016-01-02 21:02 Miller_S 阅读(291) 评论(0) 推荐(0) 编辑
摘要: Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates. For example, ret 阅读全文
posted @ 2015-12-30 11:13 Miller_S 阅读(289) 评论(0) 推荐(0) 编辑
摘要: Write a SQL query to get the second highest salary from the Employee table. For example, given the above Employee table, the second highest salary is 阅读全文
posted @ 2015-12-26 20:26 Miller_S 阅读(347) 评论(0) 推荐(0) 编辑
摘要: Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query to find all customers who never order anything 阅读全文
posted @ 2015-12-21 20:14 Miller_S 阅读(350) 评论(0) 推荐(0) 编辑
摘要:   思路: 两种思路,可以给当成两个表也可以给当成一张表来做 group by就是按照某个属性给表分个组,然后having语句的含义是“对于每一个group”怎么怎么样   补充知识:count(column),count(distinct column),count(*)的区别 对于符合条件(通过 阅读全文
posted @ 2015-12-21 15:57 Miller_S 阅读(196) 评论(0) 推荐(0) 编辑