摘要: int mp[505][505],vis[505] int prime(int n) { int lowcost[505],sum=0; for(int i=1;ilowcost[k]) mi=lowcost[k],j=k; vis[j]=1; sum+=lowcost[j]; for(int k=1;kmp... 阅读全文
posted @ 2016-07-13 22:44 weeping 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 转自:yinthewind的博客 这两天看到了线性时间筛选素数,觉得它的扩展很神奇= = 先来基本的 #define N 10000000int prime[N],p;bool iscomp[N+1];void primetable(){ for(int i=2;i<=N;i++) { if(isc 阅读全文
posted @ 2016-07-13 09:26 weeping 阅读(152) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/gym/100989/my B. LCS (B) time limit per test 0.25 seconds memory limit per test 256 megabytes input standard input output standa 阅读全文
posted @ 2016-07-12 10:28 weeping 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include 15 #include 16 #... 阅读全文
posted @ 2016-07-11 12:07 weeping 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 解出的是最小正整数解 阅读全文
posted @ 2016-06-01 22:59 weeping 阅读(326) 评论(0) 推荐(0) 编辑
摘要: int c[2*K]; void add(int x,int v) { when(x0) { ret+=c[x]; x-=x&(-x); } return ret; } 阅读全文
posted @ 2016-05-11 22:05 weeping 阅读(132) 评论(2) 推荐(0) 编辑
摘要: 记得有个小地方打错变量名了,要用的话自己改下就好 阅读全文
posted @ 2016-05-11 22:00 weeping 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/contest/show/95 题目: R - Japan R - Japan Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) S 阅读全文
posted @ 2016-05-03 18:47 weeping 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/contest/show/95 题目: Q - 昊昊爱运动 II Q - 昊昊爱运动 II Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Oth 阅读全文
posted @ 2016-05-03 18:43 weeping 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1344 题目: 卿学姐种美丽的花 卿学姐种美丽的花 Time Limit: 8000/4000MS (Java/Others) Memory Limit: 125535/65535KB (Java/Others) 阅读全文
posted @ 2016-05-03 18:41 weeping 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/contest/show/95 题目: N - 秋实大哥搞算数 N - 秋实大哥搞算数 Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Other 阅读全文
posted @ 2016-05-03 18:38 weeping 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1342 题目: 郭大侠与甲铁城 郭大侠与甲铁城 Time Limit: 1500/800MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Subm 阅读全文
posted @ 2016-05-03 18:36 weeping 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1339 题目: 郭大侠与线上游戏 郭大侠与线上游戏 Time Limit: 6000/2000MS (Java/Others) Memory Limit: 125535/65535KB (Java/Others) 阅读全文
posted @ 2016-05-03 18:30 weeping 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1338 思路: 郭大侠与英雄学院 郭大侠与英雄学院 Time Limit: 6000/2000MS (Java/Others) Memory Limit: 225535/225535KB (Java/Others) 阅读全文
posted @ 2016-05-03 18:26 weeping 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1337 思路: 郭大侠与阴阳家 郭大侠与阴阳家 Time Limit: 3000/4000MS (Java/Others) Memory Limit: 262144/262144KB (Java/Others) S 阅读全文
posted @ 2016-05-03 18:25 weeping 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1341 题目: 卿学姐与城堡的墙 卿学姐与城堡的墙 Time Limit: 2000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) S 阅读全文
posted @ 2016-05-03 18:23 weeping 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1329 题目: 卿学姐与魔法 卿学姐与魔法 Time Limit: 1200/800MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit 阅读全文
posted @ 2016-05-03 18:19 weeping 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1334 题目: 郭大侠与Rabi-Ribi 郭大侠与Rabi-Ribi Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java 阅读全文
posted @ 2016-05-03 18:15 weeping 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1328 题目: 卿学姐与诡异村庄 卿学姐与诡异村庄 Time Limit: 4500/1500MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) S 阅读全文
posted @ 2016-05-03 18:12 weeping 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.uestc.edu.cn/#/problem/show/1325 题目: 卿学姐与基本法 卿学姐与基本法 Time Limit: 2000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Sub 阅读全文
posted @ 2016-05-03 18:09 weeping 阅读(315) 评论(0) 推荐(0) 编辑