随笔分类 - 生活-OI
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=1406题意:求$0using namespace std;typedef long long ll;set s;int main() { ll n; scanf("%lld", &n); for(int...
阅读全文
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=2456题意:给一个$n#include int main() { int n, now, tot=1, i, t; scanf("%d%d", &n, &now); for(i=1; i<n; ++i)...
阅读全文
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=3834题意:求$max\{(i,j)\}, sminusing namespace std;int main() { int cs, smin, smax, wmin, wmax, ans; scanf...
阅读全文
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=3434 题意:n维坐标中要找c个点使得c个点在一条线上且每一维的坐标单调递增且不能超过每一维限定的值m[i](n<=11, 2<=c<=20, m[i]<=100000) #include <bits/
阅读全文
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=2693题意:求$\sum_{i=1}^{n} \sum_{j=1}^{m} lcm(i, j)$, $n,m \le 1e7$, 多个询问$q \le 10000$#include using name...
阅读全文
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=2154题意:求$\sum_{i=1}^{n} \sum_{j=1}^{m} lcm(i, j)$, $n,musing namespace std;typedef long long ll;const ...
阅读全文
摘要:题意:求$$\sum_{i=1}^{n} \sum_{j=1}^{m} \sum_{d|(i, j)} d 且 (\sum_{d|(i, j)} d)using namespace std;const int N=1e5+10, MN=1e5, YU=(1uMN) break; np[t]=1;...
阅读全文
摘要:题意:给定一个长度为n的序列,m次询问,每次询问一个区间[l, r],求max(Ai xor Ai+1 xor Ai+2 ... xor Aj),其中lusing namespace std;const int nT=5000005, N=12005;struct node *null;struct...
阅读全文
摘要:妈呀...发现不发博文公布自己要学的东西压力少太多了..........然后就会变得颓废.....................求大家监督QAQ....To Do List是近3天左右目标,3天一更.............(而不是一大版一大版的.............ps:做完了的都已经打上透...
阅读全文
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=3065题意:带插入、修改的区间k小值在线查询。(原序列nusing namespace std;const int nTr=1000005, nSg=15000005, alphaA=4, alphaB...
阅读全文
摘要:http://poj.org/problem?id=1739题意:n×m的棋盘,'#'是障碍,'.'是空白,求左下角走到右下角且走过所有空白格子的方案数。(n,m#include #include using namespace std;typedef long long ll;#define BI...
阅读全文
摘要:http://poj.org/problem?id=3133题意:n×m的网格,有2个2,2个3,他们不会重合。还有障碍1。现在求2到2的路径和3到3的路径互不相交的最短长度-2。(2#include #include using namespace std;struct H { static co...
阅读全文
摘要:http://acm.fzu.edu.cn/problem.php?pid=1977题意:n×m的网格,有3种格子,'O'必须经过、'*'可以选择经过、'X'不能经过。现在要求路径经过所有'O'且是简单回路的数量#include #include #include using namespace s...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1693题意:n×m的棋盘求简单回路(可以多条)覆盖整个棋盘的方案,障碍格不许摆放。(n,m#include #include using namespace std;typedef long long ll;str...
阅读全文
摘要:http://acm.timus.ru/problem.aspx?space=1&num=1519题意:给一个n×m的棋盘,其中'.'是空白,'*'是障碍,求经过所有点的哈密顿回路的数目。(n,musing namespace std;typedef long long ll;#define BIT...
阅读全文
摘要:开一个新坑......(听说tc是智商高的人才能玩的QAQ显然我是被屠的...1【645DIV2】这个能说是裸模拟吗...弃坑= =做了一些题感觉没必要放上来了= =等div1先吧...................(tc客户端太慢辣!
阅读全文
摘要:http://poj.org/problem?id=2406题意:给定一个字符串 L,已知这个字符串是由某个字符串 S 重复 R 次而得到的,求 R 的最大值。(长度#include #include #include #include using namespace std;int p[20000...
阅读全文
摘要:http://www.spoj.com/problems/DISUBSTR/题意:求字符串不同子串的数目。#include using namespace std;const int N=1005;void sort(int *x, int *y, int *sa, int n, int m) { ...
阅读全文
摘要:http://poj.org/problem?id=3261题意:一个长度为n的串,要求最长的子串的长度且这个子串的出现次数不少于k次。(1#include using namespace std;const int N=20015;void sort(int *x, int *y, int *sa...
阅读全文
摘要:http://poj.org/problem?id=1743题意:不可重叠最长重复子串,n#include using namespace std;const int N=20015;void sort(int *x, int *y, int *sa, int n, int m) { static ...
阅读全文

浙公网安备 33010602011771号