题目传送 推公式博客传送 推完式子就是去朴素地求就行了Orz const int maxn = 1e5 + 5; const int mod = 1e9 + 7; int m, mu[maxn], vis[maxn], primes[maxn], tot; ll dp[maxn]; vector<int> factor[maxn]; ll ksm(ll a, ll b) { ll ret = 1; for (; b; b >>= 1) { if (b & 1) ret =…
B. Maximum Submatrix 2 Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/problemset/problem/375/B Description You are given a matrix consisting of digits zero and one, its size is n × m. You are allowed to rearrange its rows. What is…
E. LIS of Sequence Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/486/problem/E Description The next "Data Structures and Algorithms" lesson will be about Longest Increasing Subsequence (LIS for short) of a sequence.…