摘要: 这套题分别在总结3313~3321A.水B.大模拟,敲了好长时间。。。#include#include#includeusing namespace std;char str[35][1000] = {"111111MMM11111111MMMMMMMMMMM111111111MMMMMMMM111... 阅读全文
posted @ 2015-04-14 15:48 icodefive 阅读(564) 评论(0) 推荐(0) 编辑
摘要: src:源点sink:汇点#include#include#include#includeusing namespace std;const int inf = 1000000000;const int maxn = 20000, maxm = 500000;struct Edge{ int ... 阅读全文
posted @ 2015-03-27 19:50 icodefive 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 数据水,但是各种wa各种t各种re最后照着别人的改了改发现了毛病数组做指针传入的时候系统是不知道传入后的数字的长度的如果用memset他就只会讲指针的地方清零#include#include#include#include#includeusing namespace std;const int c... 阅读全文
posted @ 2015-03-26 14:47 icodefive 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 基础ac自动机模板#include#include#include#include#includeusing namespace std;const int maxa = 500000;const int cha = 26;int n, m, k;struct Tire{ int next[m... 阅读全文
posted @ 2015-03-26 11:58 icodefive 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 这次A的题全是亮哥敲的,丧失也出了不少思路,基本就我在躺,得让自己的思路和代码能力迅速提高起来,尽自己最大的力量吧。比赛后又敲了一遍。A.给前三个数求第k项,需判断是等差还是等比数列。#include#includeusing namespace std;const long long mod = ... 阅读全文
posted @ 2015-03-23 19:44 icodefive 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 当用import的时候系统会在内部存一些地址,比如解释器所在的的地址,一般会把包文件存在顶层文件所在的目录下,但是如果不是这样的话系统就会提示找不到这个包文件,这时候就需要from sys import pathpath.append(r"包文件地址")这样就会在目录下添加新的地址了。 阅读全文
posted @ 2015-03-17 18:44 icodefive 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 题目大意:给出n求sn,中括号代表向下取整。为了方便表述,我们令a = (3k+6)!,b = (3k+7),令c = (a+1)/b也就是式子中的前半部分,d = a/b也就是式子中的后半部分。观察c,d我们可以知道只有当c为整数时[c-[d]]为1,其他时候都是0,即只有当(a+1)%b==0时... 阅读全文
posted @ 2015-03-16 11:04 icodefive 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 我必须要说的是输出时printf("%f", a);而不是%lf那样会wa这是我付出了n个小时得到的教训#include#include#include#include#includeusing namespace std;const int maxa = 1005;struct edge{ int... 阅读全文
posted @ 2015-03-06 20:21 icodefive 阅读(194) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;const int maxa = 50005;int rmp_max[maxa][100];int rmp_min[maxa][100];int log(int n){ int cnt = 0; while(n)... 阅读全文
posted @ 2015-03-06 16:40 icodefive 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目大意,1#include#includeusing namespace std;const int maxa = (1 maxn){ maxn = dp[n][i]; ans = i; } /... 阅读全文
posted @ 2015-03-03 19:22 icodefive 阅读(192) 评论(0) 推荐(0) 编辑