摘要:
Background To The Moon is a independent game released in November 2011, it is a role-playing adventure game powered by RPG Maker. The premis... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(132)
评论(0)
推荐(0)
摘要:
给定一棵N个节点的树,每个点有一个权值,对于M个询问(u,v,k),你需要回答u xor lastans和v这两个节点间第K小的点权。其中lastans是上一个询问的答案,初始为0,即第一个询问的u是明文。Input 第一行两个整数N,M。 第二行有N个整数,其中第i个整数表示点i的... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(100)
评论(0)
推荐(0)
摘要:
总算是把动态求区间第k个数的算法看明白了。 在主席树的基础上,如果有修改操作,则要通过套树状数组来实现任意区间求第k小的问题。 刚开始看不明白什么意思,现在有一点理解。树状数组的每个元素是一个线段树,来维护修改后的前后缀和,树状数组能在log时间内更整个数组,现在用相同的方式更新整个... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(131)
评论(0)
推荐(0)
摘要:
Mr. Frog has an integer sequence of length n, which can be denoted as a1,a2,⋯,ana1,a2,⋯,anThere are m queries. In the i-th query, you are given two in... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(179)
评论(0)
推荐(0)
摘要:
很明显 主席树:是一个需要离散化的过程,一棵树就是整个所有序列的离散后的值, 然后从sum中开始找// 题意// 给出一个序列,m组查询,对每个查询(i, j, k)需要输出区间[i, j]中第k大的数。// 题解// 主席树的入门题。 // 主席树其实就是可持久化线段树,比如现有... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(97)
评论(0)
推荐(0)
摘要:
题意:给出一个字符串,求出第k小的子串,并求出字符串的起止位置,如果有多个重复的子串,求出位置最靠左的子串。 思路:比赛时,想到了要用后缀数组,但是没想到如何做。 其实,因为子串是后缀的前缀,后缀数组对后缀排序的同时,也对子串进行了排序。对于每一个sa[i],会产... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(112)
评论(0)
推荐(0)
摘要:
Fat brother and Maze are playing a kind of special (hentai) game with two integers. All the digits of these two integers are in the range from... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(152)
评论(0)
推荐(0)
摘要:
题意:有n个区间,对于第i个区间[li,ri]有liusing namespace std;namespace IO { const int MX = 4e7; //1e7占用内存11000kb char buf[MX]; int c, sz; void... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(113)
评论(0)
推荐(0)
摘要:
You are given an matrix M (consisting of nonnegative integers) and an integer K. For any submatrix of M’ of M define min(M’) to be the minimu... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(121)
评论(0)
推荐(0)
摘要:
B. The Bakery time limit per test2.5 seconds memory limit per test256 megabytes inputstandard input outputstandard outputSome time ago Slastyo... 阅读全文
posted @ 2017-09-19 21:18
黑码的博客
阅读(466)
评论(0)
推荐(0)
浙公网安备 33010602011771号