Coding Contest Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2653 Accepted Submission(s): 579 Problem Description A coding contest will be held in this university, in a huge playground. The…
题目链接:http://acm.hit.edu.cn/hoj/problem/view?id=2739 Time limit : 1 sec Memory limit : 64 M A Chinese postman is assigned to a small town in China to deliver letters. In this town, each street is oriented and connects exactly two junctions. The postma…
Practice Link J. Rikka with Nickname 题意: 给出\(n\)个字符串,要求依次合并两个串\(s, t\),满足将\(t\)合并到\(s\)中变成\(r\),使得\(s\)是\(r\)的前缀,并且\(t\)是\(r\)的一个子序列. 思路: 动态维护序列自动机,贪心插入即可. 代码: #include <bits/stdc++.h> using namespace std; #define N 1000010 char s[N], res[N]; int nx…
6343.Problem L. Graph Theory Homework 官方题解: 一篇写的很好的博客: HDU 6343 - Problem L. Graph Theory Homework - [(伪装成图论题的)简单数学题] 代码: //1012-6343-数学 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<bitset&g…
Problem L.Videos Problem Description: C-bacteria takes charge of two kinds of videos: ’The Collection of Silly Games’ and ’The Collection of Horrible Games’.For simplicity’s sake, they will be called as videoA and videoB.There are some people who wan…
Coding Contest Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1751 Accepted Submission(s): 374 Problem Description A coding contest will be held in this university, in a huge playground. The…
A - Problem A.Alkane 留坑. B - Problem B. Beads 留坑. C - Problem C. Calculate 留坑. D - Problem D. Permutation 留坑. E - Problem E. TeaTree 题意:每个点会存下任意两个以他为LCA的点对的GCD,求每个点存的GCD的最大值 思路:DSU on tree 用 set 维护子树中的因子,对于重儿子不要处理多次 每次查找的时候,枚举轻儿子中的因子 还有一种线段树合并的写法 #i…
Special Fish Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2189 Accepted Submission(s): 826 Problem Description There is a kind of special fish in the East Lake where is closed to campus of…