上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 20 下一页
摘要: A. Remove a Progression Description: You have a list of numbers from $1$ to $n$ written from left to right on the blackboard. You perform an algorithm 阅读全文
posted @ 2019-07-30 17:36 Snow_in_winer 阅读(244) 评论(0) 推荐(0) 编辑
摘要: #include typedef long long ll; using namespace std; const ll maxm=55000; const ll maxn=300; const ll inf=0x3f3f3f3f; ll n,m,d[maxn],u[maxm],d2[maxn],v[maxm],w[maxm],d1[maxn]; struct Dijkstra ... 阅读全文
posted @ 2019-07-30 17:20 Snow_in_winer 阅读(159) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6604 Problem Description Country A and B are at war. Country A needs to organize transport teams to deliver 阅读全文
posted @ 2019-07-29 18:39 Snow_in_winer 阅读(196) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; struct Point { double x,y; Point() {}; Point(int _x,int _y):x(_x),y(_y) {}; } p[400]; double dis(Point a,Point b) { return sqrt(... 阅读全文
posted @ 2019-07-29 11:42 Snow_in_winer 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 采用分治的思想,把n个点按照x坐标进行排序,以坐标mid为界限分成左右两个部分,对左右两个部分分别求最近点对的距离,然后进行合并。对于两个部分求得的最近距离d,合并过程中应当检查宽为2d的带状区间是否有两个点分属于两个集合而且距离小于d,最多可能有n个点,合并时间最坏情况下是O(n^2).但是,左边 阅读全文
posted @ 2019-07-29 11:00 Snow_in_winer 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const ll mod=1e9+7; 5 const int N=2e6+10; 6 ll c[N],b[N]; 7 ll n,k,a,ans; 8 阅读全文
posted @ 2019-07-28 18:33 Snow_in_winer 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 3 4 #include <bits/stdc++.h> 5 6 using namespace std; 7 typedef long long ll; 8 const int N=1e5+10; 9 const ll inf=0x3f3f3f3f3f3f3f3f; 10 struc 阅读全文
posted @ 2019-07-27 18:20 Snow_in_winer 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int N=100101; 5 int n,pre[N],num0,num1,a[N*3],ans; 6 char c[N]; 7 int main(){ 8 scanf("%d" 阅读全文
posted @ 2019-07-25 18:09 Snow_in_winer 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-07-25 09:31 Snow_in_winer 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 typedef long long ll; 5 const int N=3030; 6 ll a[N],pre[N],ans[N],inv3; 7 const ll mod=998244353 阅读全文
posted @ 2019-07-24 18:53 Snow_in_winer 阅读(193) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 20 下一页