上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 31 下一页
摘要: /* 好神奇好神奇...表示自己要学的还很多 注意到n #include #include #define maxn 520 using namespace std; int n,K,v1[maxn],v2[maxn][maxn],cnt[maxn]; long long ans,f[10][100][maxn]; void Get_v() { for(int i=0;i>1))==0)... 阅读全文
posted @ 2016-08-15 21:38 一入OI深似海 阅读(300) 评论(0) 推荐(0) 编辑
摘要: /* floyd 传递闭包 开始Floyd 之后统计每个点能到的或能到这个点的 也就是他能和几个人确定胜负关系 第一批要有n-1个 然后每次减掉上一批的人数 麻烦的很 复杂度上天了.... 正难则反 我们考虑一定不能确定排名的 */ #include #include #include #define maxn 110 using namespace std; int n,m,f[maxn]... 阅读全文
posted @ 2016-08-14 18:24 一入OI深似海 阅读(179) 评论(0) 推荐(0) 编辑
摘要: /* 一开始想的二维的 只维护第几只牛还有圈数 后来发现每只牛的能量是跟随每个状态的 所以再加一维 f[i][j][k]表示第i只牛 领跑的j全 已经消耗了k体力 转移的话分两类 1.换一只牛领跑 那么就从f[i][j][k]转移到f[i+1][j][j] 2.不换 那就枚举i领跑几圈l f[i][j-l][k-l*l]转移到f[i][j][k] 时间++ */ #include #inc... 阅读全文
posted @ 2016-08-14 16:36 一入OI深似海 阅读(293) 评论(0) 推荐(0) 编辑
摘要: /* 一开始并没有想出On的正解 后来发现题解的思路也是十分的巧妙的 还是没能把握住题目的 只有1 2这两个数的条件 dp还带练练啊 ... */ #include #include #include #define maxn 100010 using namespace std; int n,a[maxn],Q[maxn],H[maxn],ans=0x7fffffff; int main()... 阅读全文
posted @ 2016-08-14 11:19 一入OI深似海 阅读(150) 评论(0) 推荐(0) 编辑
摘要: /* 需要好大的空间..... 而且lowbit理解的不是很好 先放到博客里 以后慢慢研究 */ #include #include #include #include #define inf 999999999; #define maxn 1050000 using namespace std; int n,a[maxn]; double x[30],y[30],g[30][30],f[m... 阅读全文
posted @ 2016-08-14 09:57 一入OI深似海 阅读(168) 评论(0) 推荐(0) 编辑
摘要: /* f[i][j] 表示走过的点构成i状态 且最后到达的点为j时的最优解 在那最后一个状态就是(1 #include #include #define maxn 100010//最少到 1<<16 using namespace std; int n,g[20][20],f[maxn][20],ans=0x3f3f3f3f; int main() { scanf("%d",&n); ... 阅读全文
posted @ 2016-08-13 18:22 一入OI深似海 阅读(207) 评论(0) 推荐(0) 编辑
摘要: /*考场上写的暴力 40分钟70分*/ #include #include #include #define base 1000000000 #define maxn 100010 #define ll long long using namespace std; ll n,m,h[maxn],X,A[maxn],B[maxn],st,ans; bool falg; double mii=ba... 阅读全文
posted @ 2016-08-13 17:49 一入OI深似海 阅读(548) 评论(3) 推荐(1) 编辑
摘要: /* 这题10^8的暴力可以出答案 但是 慢..... 有个小小的bug 出题人卡int 却没注意short 用short可以不用hash 直接搞 49428K 313MS */ #include #include #include #define base 12500000 using namespace std; int a1,a2,a3,a4,a5,x1,x2,x3,x4,x5,ans; ... 阅读全文
posted @ 2016-08-12 21:28 一入OI深似海 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 开始按hash做的 交上去就wa 但是和标称拍了半天也没有不一样的 可能是生成的数据太水了吧... #include #include #include #define maxn 100010 #define mod 10000007 #define ll long long using namespace std; ll ha; int n,a[maxn][6],base,J[7]; bool... 阅读全文
posted @ 2016-08-12 16:26 一入OI深似海 阅读(640) 评论(0) 推荐(0) 编辑
摘要: /*虽然这暴力剪了又剪 改了又改 还是初始的20分...*/ #include #include #include #define maxn 2010 using namespace std; int n,sum,c[maxn],ans,p,t1,t2,c1,c2,f[maxn]; void Dfs(int now,int cost) { if(cost>=ans)return; ... 阅读全文
posted @ 2016-08-09 16:23 一入OI深似海 阅读(247) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 31 下一页