HDU5892~HDU5901 2016网络赛沈阳】的更多相关文章

A.题意: 有一个n×n的格子, 有50种怪物. 有m个操作, 每次操作会往一个矩形区域放怪物, 每个格子放相同数目的怪物, 或者查询当前50种怪物的奇偶性. 分析:用2^50表示怪物的奇偶,然后就是二维区间异或问题,用二维树状数组 考虑一维情况,给一段区间[L,R]^X,询问[1,P]   对于树状数组C[L..R],每个位置异或X的次数是奇.偶交错的的,而异或相同的一个数偶数次等于没异或,异或相同的一个数奇数次相当于异或一次 即将与L同奇偶的位置都异或一次(只有一次!) 这就好比将原来的数组…
A.题意:给出一个整数n, 找出一个大于等于n的最小整数m, 使得m的质因数只有2 3 5 7 分析:预处理出质因数2 3 5 7的数,超过maxt就行,然后找 B.题意:求1/1^2+1/2^2+...+1/n^2 分析:题坑,意思是n很大 感觉上越到后来值越小,实际上这个是趋向π^2/6,于是小范围的n直接递推,大范围的就输出π^2/6 C. D.题意:有一壶水, 体积在 LL 和 RR 之间, 有两个杯子, 你要把水倒到两个杯子里面, 使得杯子水体积几乎相同(体积的差值小于等于1), 并且…
描述 Institute of Computational Linguistics (ICL), Peking University is an interdisciplinary institute of science and liberal arts, it focuses primarily on the fundamental researches and applications of language information processing. The research of…
描述 The history of Peking University Library is as long as the history of Peking University. It was build in 1898. At the end of year 2015, it had about 11,000 thousand volumes of books, among which 8,000 thousand volumes were paper books and the othe…
#1389 : Sewage Treatment 时间限制:2000ms 单点时限:2000ms 内存限制:256MB 描述 After years of suffering, people could not tolerate the pollution in the city any more, and started a long-lasting protest. Eventually, the municipal government made up its mind to deal w…
#1391 : Countries 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There are two antagonistic countries, country A and country B. They are in a war, and keep launching missiles towards each other. It is known that country A will launch N missiles. The i-th miss…
#1392 : War Chess 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 Rainbow loves to play kinds of War Chess games. There are many famous War Chess games such as "Biography of Cao Cao", "Anecdotes of Wagang Mountain", etc. In this problem, let's c…
2018 ICPC 沈阳网络赛 Call of Accepted 题目描述:求一个算式的最大值与最小值. solution 按普通算式计算方法做,只不过要同时记住最大值和最小值而已. Convex Hull 题目描述:定义函数\(gay(x)\),若\(x\)是某个非\(1\)的数的平方的倍数,则\(gay(x)=0\),否则\(gay(x)=x^2\),求\(\sum_{num=1}^{n} ( \sum_{i=1}^{num} gay(x) ) mod p\) solution \[\sum…
题目链接  2016 青岛网络赛  Problem C 题意  给出一些敏感词,和一篇文章.现在要屏蔽这篇文章中所有出现过的敏感词,屏蔽掉的用$'*'$表示. 建立$AC$自动机,查询的时候沿着$fail$指针往下走,当匹配成功的时候更新$f[i]$ $f[i]$表示要屏蔽以第$i$个字母结尾的长度为$f[i]$的字符串. #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i(a); i &l…
"Oh, There is a bipartite graph.""Make it Fantastic." X wants to check whether a bipartite graph is a fantastic graph. He has two fantastic numbers, and he wants to let all the degrees to between the two boundaries. You can pick up sev…