07 2017 档案

摘要:Watashi loves M mm very much. One day, M mm gives Watashi a chance to choose a number between low and high, and if the choosen number is lucky, M mm w 阅读全文
posted @ 2017-07-31 20:40 meekyan 阅读(238) 评论(0) 推荐(0)
摘要:D. The Bakery Some time ago Slastyona the Sweetmaid decided to open her own bakery! She bought required ingredients and a wonder-oven which can bake s 阅读全文
posted @ 2017-07-31 11:02 meekyan 阅读(325) 评论(0) 推荐(0)
摘要:Problem 2200 cleaning Problem Description N个人围成一圈在讨论大扫除的事情,需要选出K个人。但是每个人与他距离为2的人存在矛盾,所以这K个人中任意两个人的距离不能为2,他们想知道共有多少种方法。 Input 第一行包含一个数T(T<=100),表示测试数据的 阅读全文
posted @ 2017-07-30 14:09 meekyan 阅读(205) 评论(0) 推荐(0)
摘要:Prime Distance On Tree Problem description. You are given a tree. If we select 2 distinct nodes uniformly at random, what's the probability that the d 阅读全文
posted @ 2017-07-29 20:05 meekyan 阅读(607) 评论(0) 推荐(0)
摘要:E -- Expected value of the expression E -- Expected value of the expression DESCRIPTION You are given an expression: A0O1A1O2A2⋯OnAnA0O1A1O2A2⋯OnAn, w 阅读全文
posted @ 2017-07-29 16:51 meekyan 阅读(209) 评论(0) 推荐(0)
摘要:Arithmetic Progressions Given N integers A1, A2, …. AN, Dexter wants to know how many ways he can choose three numbers such that they are three consec 阅读全文
posted @ 2017-07-29 11:03 meekyan 阅读(162) 评论(0) 推荐(0)
摘要:#6006. 「网络流 24 题」试题库 #6006. 「网络流 24 题」试题库 #6006. 「网络流 24 题」试题库 题目描述 假设一个试题库中有 n nn 道试题。每道试题都标明了所属类别。同一道题可能有多个类别属性。现要从题库中抽取 m mm 道题组成试卷。并要求试卷包含指定类型的试题。 阅读全文
posted @ 2017-07-28 15:46 meekyan 阅读(531) 评论(0) 推荐(1)
摘要:#2033. 「SDOI2016」生成魔咒 #2033. 「SDOI2016」生成魔咒 #2033. 「SDOI2016」生成魔咒 题目描述 魔咒串由许多魔咒字符组成,魔咒字符可以用数字表示。例如可以将魔咒字符 1 11、2 22 拼凑起来形成一个魔咒串 [1,2] [1, 2][1,2]。 一个魔 阅读全文
posted @ 2017-07-28 11:09 meekyan 阅读(723) 评论(0) 推荐(1)
摘要:1 阅读全文
posted @ 2017-07-27 17:14 meekyan 阅读(142) 评论(0) 推荐(0)
摘要:官方题解 1001. Add More Zero #pragma comment(linker, "/STACK:1024000000,1024000000") #include<iostream> #include<cstdio> #include<cmath> #include<string> 阅读全文
posted @ 2017-07-25 19:30 meekyan 阅读(284) 评论(1) 推荐(0)
摘要:题目链接:传送门 题解: 利用KMP的fail失配数组,快速找到当前后缀与前缀的公共前缀点 阅读全文
posted @ 2017-07-24 20:21 meekyan 阅读(259) 评论(0) 推荐(0)
摘要:#6173. Samjia 和矩阵 题目链接 : 点这里 #6173. Samjia 和矩阵 #6173. Samjia 和矩阵 题目链接 : 点这里 题目描述 给你一个只包含大写字母的矩阵,求有多少本质不同的子矩阵。 输入格式 第一行包含两个整数 nnn , mmm ,表示矩阵 nnn 行 mmm 阅读全文
posted @ 2017-07-24 10:32 meekyan 阅读(379) 评论(0) 推荐(0)
摘要:题目链接:传送门 题解: 枚举每一行,每一行当中连续的y个我们hash 出来 那么一行就是 m - y + 1个hash值,形成的一个新 矩阵 大小是 n*(m - y + 1), 我们要找到x*y这个矩阵的 话 是不是就是 在每一列跑kmp就行了? 阅读全文
posted @ 2017-07-23 23:07 meekyan 阅读(209) 评论(0) 推荐(0)
摘要:题目链接:传送门 题意: 给你n个串 问你任意两个串的最大公共前缀长度是多少 题解: 二分+hash 思路很明显,我最近用来写hash 很鸡肋 阅读全文
posted @ 2017-07-23 23:05 meekyan 阅读(230) 评论(0) 推荐(0)
摘要:题目链接:传送门 题意: 给你一个串S 你可以在结尾补充任意数量字母,问最少数量使得新串是回文串 题解: KMP 将S串倒置跑KMP 阅读全文
posted @ 2017-07-23 23:01 meekyan 阅读(222) 评论(0) 推荐(0)
摘要:题目链接:传送门 题意: 给你两个集合A,B,任意组合成新的集合C(去重) 问你最后C集合大小 题解: 暴力 组成的新串hash起来 阅读全文
posted @ 2017-07-23 22:57 meekyan 阅读(346) 评论(0) 推荐(0)
摘要:String Problem Description Given a string S and two integers L and M, we consider a substring of S as “recoverable” if and only if (i) It is of length 阅读全文
posted @ 2017-07-23 22:55 meekyan 阅读(480) 评论(0) 推荐(0)
摘要:Edward has a permutation {a1, a2, … an}. He finds that if he connects each pair (ai, aj) such that i < j and ai > aj, he will get a graph. For example 阅读全文
posted @ 2017-07-22 11:16 meekyan 阅读(668) 评论(0) 推荐(0)
摘要:有用的表格 详细 http://blog.miskcoo.com/2014/07/fft-prime-table 阅读全文
posted @ 2017-07-22 09:59 meekyan 阅读(256) 评论(0) 推荐(0)
摘要:2141: 排队 Description 排排坐,吃果果,生果甜嗦嗦,大家笑呵呵。你一个,我一个,大的分给你,小的留给我,吃完果果唱支歌,大家乐和和。红星幼儿园的小朋友们排起了长长地队伍,准备吃果果。不过因为小朋友们的身高有所区别,排成的队伍高低错乱,极不美观。设第i个小朋友的身高为hi,我们定义一 阅读全文
posted @ 2017-07-16 11:43 meekyan 阅读(174) 评论(0) 推荐(0)
摘要:题目链接:点这里!! 题意:中文题 题解: f[i]:以第i个数结尾的LIS的长度,和该长度的LIS数量 转移的话,显然f[i].first=max{f[j].first}+1,j<i且a[j]<a[i] f[i].second=∑jf[j].second,f[j].first=f[i].first 阅读全文
posted @ 2017-07-15 17:08 meekyan 阅读(198) 评论(-1) 推荐(0)
摘要:Segments Problem Description 由3钟类型操作:1)D L R(1 <= L <= R <= 1000000000) 增加一条线段[L,R]2)C i (1-base) 删除第i条增加的线段,保证每条插入线段最多插入一次,且这次删除操作一定合法3) Q L R(1 <= L 阅读全文
posted @ 2017-07-15 11:20 meekyan 阅读(162) 评论(0) 推荐(0)
摘要:3295: [Cqoi2011]动态逆序对 Description 对于序列A,它的逆序对数定义为满足i<j,且Ai>Aj的数对(i,j)的个数。给1到n的一个排列,按照某种顺序依次删除m个元素,你的任务是在每次删除一个元素之前统计整个序列的逆序对数。 对于序列A,它的逆序对数定义为满足i<j,且A 阅读全文
posted @ 2017-07-14 16:00 meekyan 阅读(190) 评论(0) 推荐(0)
摘要:零件组装 描述 现有n个零件,小Y花费了很多时间来收集它们,现在他想把零件拼在一起,拼完就可以召唤神龙了。已知零件之间存在相邻的关系,拥有相邻关系的零件在最终的组装结果中就是相邻的,并且组装过程中每次只能通过相邻关系来组合零件。小Y每次可以选择两个零件(也可以是两个零件块,或一个零件与一个零件块)拼 阅读全文
posted @ 2017-07-10 20:46 meekyan 阅读(265) 评论(0) 推荐(0)
摘要:学不动 阅读全文
posted @ 2017-07-09 17:31 meekyan 阅读(201) 评论(6) 推荐(0)
摘要:题意 游乐园被描述成一张 n 个点,m 条边的无向图(无重边,无自环)。每个点代表一个娱乐项目,第 i 个娱乐项目需要耗费 ci 分钟的时间,会让小 y 和妹子的开心度分别增加 h1i ,h2i ,他们俩初始的开心度都是 0 。每条边代表一条路,第 i 条边连接编号为 xi , yi 的两个娱乐项目 阅读全文
posted @ 2017-07-08 09:38 meekyan 阅读(509) 评论(0) 推荐(0)
摘要:E. Liar The first semester ended. You know, after the end of the first semester the holidays begin. On holidays Noora decided to return to Vičkopolis. 阅读全文
posted @ 2017-07-07 20:34 meekyan 阅读(216) 评论(0) 推荐(0)
摘要:D. My pretty girl Noora In Pavlopolis University where Noora studies it was decided to hold beauty contest "Miss Pavlopolis University". Let's describ 阅读全文
posted @ 2017-07-07 20:26 meekyan 阅读(263) 评论(0) 推荐(0)
摘要:C. Hacker, pack your bags! It's well known that the best way to distract from something is to do one's favourite thing. Job is such a thing for Leha. 阅读全文
posted @ 2017-07-07 20:18 meekyan 阅读(347) 评论(0) 推荐(0)
摘要:B. Crossword solving Erelong Leha was bored by calculating of the greatest common divisor of two factorials. Therefore he decided to solve some crossw 阅读全文
posted @ 2017-07-07 20:12 meekyan 阅读(529) 评论(0) 推荐(0)
摘要:A. I'm bored with life Holidays have finished. Thanks to the help of the hacker Leha, Noora managed to enter the university of her dreams which is loc 阅读全文
posted @ 2017-07-07 20:07 meekyan 阅读(388) 评论(0) 推荐(0)
摘要:wmq的A×B Problem 发布时间: 2017年4月9日 17:06 最后更新: 2017年4月9日 17:07 时间限制: 3000ms 内存限制: 512M 描述 这是一个非常简单的问题。 wmq如今开始学习乘法了!他为了训练自己的乘法计算能力,写出了n个整数,并且对每两个数a,b都求出了 阅读全文
posted @ 2017-07-02 22:07 meekyan 阅读(333) 评论(0) 推荐(0)
摘要:3527: [Zjoi2014]力 Description 给出n个数qi,给出Fj的定义如下: 令Ei=Fi/qi,求Ei. 给出n个数qi,给出Fj的定义如下: 令Ei=Fi/qi,求Ei. Input 第一行一个整数n。 接下来n行每行输入一个数,第i行表示qi。 n≤100000,0<qi< 阅读全文
posted @ 2017-07-02 16:56 meekyan 阅读(178) 评论(0) 推荐(0)
摘要:E. Thief in a Shop A thief made his way to a shop. As usual he has his lucky knapsack with him. The knapsack can contain k objects. There are n kinds 阅读全文
posted @ 2017-07-02 15:24 meekyan 阅读(265) 评论(0) 推荐(0)
摘要:#1388 : Periodic Signal 描述 Profess X is an expert in signal processing. He has a device which can send a particular 1 second signal repeatedly. The si 阅读全文
posted @ 2017-07-01 20:24 meekyan 阅读(282) 评论(0) 推荐(0)
摘要:Triple Sums You're given a sequence s of N distinct integers.Consider all the possible sums of three integers from the sequence at three different ind 阅读全文
posted @ 2017-07-01 17:36 meekyan 阅读(381) 评论(0) 推荐(0)
摘要:题目链接:点这里 题意: 给你一个矩阵R*C,n个点,与给的的n个点同一列同一行,同一条主对角线上的点都被染黑 问你最后有多少个点没有被染黑 题解: 把每一列每一行没有被染黑的x,y找出来,其任意组合起来是没这种情况下的答案(同一条主对角线上的点都被染黑) 对于 x - y,我们可以拿来判断两个点是 阅读全文
posted @ 2017-07-01 15:49 meekyan 阅读(200) 评论(0) 推荐(0)
摘要:A * B Problem Plus Problem Description Calculate A * B. Input Each line will contain two integers A and B. Process to end of file.Note: the length of 阅读全文
posted @ 2017-07-01 11:37 meekyan 阅读(168) 评论(0) 推荐(0)
摘要:3-idiots Problem Description King OMeGa catched three men who had been streaking in the street. Looking as idiots though, the three men insisted that 阅读全文
posted @ 2017-07-01 10:52 meekyan 阅读(175) 评论(0) 推荐(0)