Self-examination】的更多相关文章

Physical Examination Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4442 Description WANGPENG is a freshman. He is requested to have a physical examination when entering the university. Now WAN…
HDU 4442 Physical Examination(贪心) 题目链接http://acm.split.hdu.edu.cn/showproblem.php?pid=4442 Description WANGPENG is a freshman. He is requested to have a physical examination when entering the university. Now WANGPENG arrives at the hospital. Er-.. Th…
E - Forensic Examination 我也不知道为什么这个复杂度能过, 而且跑得还挺快, 数据比较水? 在sa上二分出上下界, 然后莫队 + 线段树维护区间众数. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define PLL pair<LL, LL> #define PLI pair<LL, int&g…
[CF666E]Forensic Examination 题意:给你一个字符串s和一个字符串集合$\{t_i\}$.有q个询问,每次给出$l,r,p_l,p_r$,问$s[p_l,p_r]$在$t_l...t_r$中的哪个字符串中出现的次数最多,以及最多次数是多少. $|s|\le 5\times 10^5,\sum |t_i|\le 5\times 10^4,q\le 5\times10^5$ 题解:我们对于$t_i$建立广义后缀自动机,并对于每个节点都维护:在它的right集合中,每个字符串…
E. Forensic Examination time limit per test:6 seconds memory limit per test:768 megabytes input:standard input output:standard output The country of Reberland is the archenemy of Berland. Recently the authorities of Berland arrested a Reberlandian sp…
Physical Examination Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6155 Accepted Submission(s): 1754 Problem Description WANGPENG is a freshman. He is requested to have a physical examination wh…
[CF666E]Forensic Examination(后缀自动机,线段树合并) 题面 洛谷 CF 翻译: 给定一个串\(S\)和若干个串\(T_i\) 每次询问\(S[pl..pr]\)在\(T_l..T_r\)中出现的最多次数,以及出现次数最多的那个串的编号. 题解 好题啊. 我们对于所有的\(T\)串构建出广义后缀自动机之后 把\(S\)丢到\(SAM\)上匹配,对于每组询问, 相当于回答\(S[pl..pr]\)所代表的节点的\(right\)集合所代表的串的众数是哪个串,以及这个众数…
E. Forensic Examination http://codeforces.com/problemset/problem/666/E 题目大意:给模式串S以及m个特殊串,q个询问,询问S的子串[pl,pr]在特殊串编号属于[l,r]中出现次数最多的次数以及在哪个特殊串. 一开始打算用S建SAM,特殊串去匹配...测样例时才想起这样不对.胡搞一番后,才开始写下面的做法. S与特殊串连在一起建SAM,记录S串[1,x]在SAM上节点位置,用来子串定位.每个节点的{right}该串出现的所有地…
HDUPhysical Examination(贪心) 题目链接 题目大意:给N个队列,每一个队列在0时刻体检的时候完毕时间是ai.假设超过t(s),那么就是ai + t∗bi.问如何组合才干用最短的时间完毕体检(每一个队列都要去一趟). 结果要取模一个给定的数. 解题思路:相邻交换法.将这N个队列排下先后体检的顺序.然后在计算要花费的时间就能够了,要用long Long,ai∗bi会int溢出. 代码: #include <cstdio> #include <cstring> #…
1603: Scheduling the final examination Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 49  Solved: 15 Description For the most of the university students,what they most want is that they can obtain 60 points from the final examination of every subjec…