上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: RMQ with ShiftsIn the traditional RMQ (Range Minimum Query) problem, we have a static array A. Then for each query (L, R) (LR), we report the minimum value among A[L], A[L + 1], ..., A[R]. Note that the indices start from 1, i.e. the left-most element is A[1].In this problem, the array A is no long. 阅读全文
posted @ 2013-11-07 16:51 Ramanujan 阅读(136) 评论(0) 推荐(0) 编辑
摘要: StarsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 28219Accepted: 12368DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to 阅读全文
posted @ 2013-11-07 15:59 Ramanujan 阅读(136) 评论(0) 推荐(0) 编辑
摘要: tricks I fall into in exercises :4.1 It's better for a relation to have a primary key to avoid duplicates ...4.11 with declaration : with with_name(attri1, attri2, ..., attrin) as (...here fill query results...)4.13 answer is very simple, append depth as the last && new attribute is ok . 阅读全文
posted @ 2013-11-02 01:29 Ramanujan 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1.derived relation 如果我们要在from子句中嵌套查询语句,则该语句应该有名字2.integrity constraint ?3.21 && 3.23 阅读全文
posted @ 2013-11-01 00:33 Ramanujan 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.terminologies: attributes(column in table) table(relation) domain(permitted value)tuple(row) database shema && database instance --------------->>>> type definition && variable2.keysuperkey (can uniquely mark a tuple in a relation) ---->>>> candidate key (it 阅读全文
posted @ 2013-10-29 02:19 Ramanujan 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 29981Accepted: 14133Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with som 阅读全文
posted @ 2013-10-28 02:35 Ramanujan 阅读(217) 评论(0) 推荐(0) 编辑
摘要: A Simple Problem with IntegersTime Limit: 5000MSMemory Limit: 131072KTotal Submissions: 50205Accepted: 14911Case Time Limit: 2000MSDescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a gi 阅读全文
posted @ 2013-10-28 02:33 Ramanujan 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Ultra-QuickSortTime Limit: 7000MSMemory Limit: 65536KTotal Submissions: 35702Accepted: 12856DescriptionIn this problem, you have to analyze a particul... 阅读全文
posted @ 2013-10-27 22:44 Ramanujan 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Count ColorTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 32113Accepted: 9642DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is a very long board with length L centimeter, L is a 阅读全文
posted @ 2013-10-27 17:36 Ramanujan 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13742Accepted Submission(s): 6816Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecu 阅读全文
posted @ 2013-10-27 17:35 Ramanujan 阅读(171) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页