摘要:// 线段树// 节点保存 区间长度 和 区间的 空闲位置// 好久没写线段树了 不过除了第一次提交是数组开小导致访问非法内存了外 1Y// 我写了好多函数 分别求最左区间 最右区间 区间和 区间覆盖// 不过速度还好 去看了下排名 居然第三 O(∩_∩)O哈! 不过估计不久后就会被刷下去吧#include #include #include #include #include #include #include using namespace std;#define maxm 100010#define maxn 50010#define LL __int64#define lson l,m
阅读全文
摘要:Kth numberTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2354Accepted Submission(s): 800Problem DescriptionGive you a sequence and ask you the kth big number of a inteval.InputThe first line is the number of the test cases. For each test case, th
阅读全文
摘要:Time Limit: 20000MSMemory Limit: 65536KTotal Submissions: 29149Accepted: 8799Case Time Limit: 2000MSDescriptionYou are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to
阅读全文
摘要:Sliding WindowTime Limit: 12000MSMemory Limit: 65536KTotal Submissions: 26178Accepted: 7738Case Time Limit: 5000MSDescriptionAn array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers
阅读全文
摘要:ZOJ Problem Set - 3632Watermelon Full of WaterTime Limit: 3 Seconds Memory Limit: 65536 KBWatermelon is very popular in the hot summer. Students in ZJU-ICPC Team also love watermelon very much and they hope that they can have watermelon to eat every day during the summer vacation. Suppose there a...
阅读全文
摘要:BillboardTime Limit: 20000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3670Accepted Submission(s): 1738Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the
阅读全文
摘要:Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 22573Accepted: 10499Case 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
阅读全文