Live2d Test Env
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 101 下一页
摘要: 题意:给定A,B长度相同的字符串,Q次操作,修改操作位单个字符修改,查询操作为询问从某点开始有多少连续相同的字符。 思路:我们把不相同的设为1,相同的设为0,那么询问就是找下一个为1的为位置,可以用线段树解决,可以用set的lower_bound解决,这里用bitset的Find_next函数,效率 阅读全文
posted @ 2018-11-06 10:40 nimphy 阅读(899) 评论(0) 推荐(0) 编辑
摘要: 题意:给定N个组合,每个组合有a和b,现在求最长序列,满足a不升,b不降。 思路:三位偏序,CDQ分治。 但是没想到怎么输出最小字典序,我好菜啊。 最小字典序: 我们倒序CDQ分治,ans[i]表示倒序的以i为结尾的最长序列,如果当前的ans[i]==目前最大,而且满足序列要求,就输出。 阅读全文
posted @ 2018-11-05 23:07 nimphy 阅读(272) 评论(0) 推荐(0) 编辑
摘要: Given you a sequence of number a 1, a 2, ..., a n, which is a permutation of 1...n. You need to answer some queries, each with the following format: G 阅读全文
posted @ 2018-11-05 15:35 nimphy 阅读(314) 评论(0) 推荐(0) 编辑
摘要: Collecting one's own plants for use as herbal medicines is perhaps one of the most self-empowering things a person can do, as it implies that they hav 阅读全文
posted @ 2018-11-05 10:54 nimphy 阅读(341) 评论(0) 推荐(0) 编辑
摘要: In graph theory, the complement of a graph G is a graph H on the same vertices such that two distinct vertices of H are adjacent if and only if they a 阅读全文
posted @ 2018-11-04 19:49 nimphy 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 。。。懒得说什么了 阅读全文
posted @ 2018-11-01 21:47 nimphy 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Jimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to wal 阅读全文
posted @ 2018-11-01 16:47 nimphy 阅读(140) 评论(0) 推荐(0) 编辑
摘要: The math department has been having problems lately. Due to immense amount of unsolicited automated programs which were crawling across their pages, t 阅读全文
posted @ 2018-11-01 14:58 nimphy 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 题意:T组数据,给次给出N,M,K,多少种方案,用[0,N-1]范围的数,表示一个M排列,其和为K; 思路:隔板法,不限制[0,N-1]的时候答案是C(M+K-1,M-1);那么我们减去至少一个>=N,加上至少两个>=N....即可得到答案。 假设至少一个隔板里的数大于大于N,我们从这个隔板里抽出N 阅读全文
posted @ 2018-11-01 11:11 nimphy 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 题意:给出,三个函数,h,b,a,然后T次询问,每次给出n,求sqrt(an); 思路:不会推,但是感觉a应该是线性的,这个时候我们就可以用BM线性递推,自己求出前几项,然后放到模板里,就可以求了。 数据范围在1e15,1000组都可以秒过。 ( 那么主要的问题就是得确保是线性的,而且得求出前几项。 阅读全文
posted @ 2018-10-31 21:54 nimphy 阅读(342) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 101 下一页