- 博客(11)
- 收藏
- 关注
原创 vijos 1009 拓展gcd裸题
#include<cstdio>using namespace std;long long x1,y1,m,n,L;long long x,y;long long exgcd(long long a,long long b){ if(b==0) { x=1; y=0; return a; } lo...
2018-11-08 15:32:16 178
原创 poj3694 tarjan求桥
#include<cstdio>#include<vector>#include<cstring>#include<algorithm>using namespace std;int n,m,ans;int deep[200005],low[200005],fa[200005],pre[200005],tim;vector<int...
2018-11-07 12:59:23 220
原创 POJ 3159 差分约束 裸题
做这道题的时候同时复习了 堆优化版本的Dijkstra#include<cstdio>#include<queue>#include<cstring>#include<utility>#include<map>#include<queue>#include<vector>using namespa
2018-11-02 11:57:26 311
原创 hdu1598 最小生成树+枚举
#include<cstdio>#include<algorithm>using namespace std;int n,m,fa[205];struct node{ int u,v,s;}e[1005];bool cmp(node x,node y){ return x.s<y.s;}void init(){ ...
2018-10-26 19:28:49 266
原创 kruskal裸题 hdu1863
#include<cstdio>#include<algorithm>using namespace std;int n,m,f[105];long long ans;struct node{ int u,v,val;}e[5050];bool cmp(node a,node b){ return a.val<b.val;}int...
2018-10-26 17:33:41 178
原创 洛谷P1141-01迷宫
#include<cstdio>using namespace std;int n,m;char inpu[1005][1005];int map[1005][1005];int vis[1005][1005];int ans[100005];int dx[4]={0,0,1,-1};int dy[4]={1,-1,0,0};int f[1005][1005];in...
2018-10-16 20:48:49 279
原创 LOJ 6278
#include<cstdio>#include<cmath>#include<vector>#include<algorithm>#define ll long longusing namespace std;int n,blo,bl[50005];ll a[50005],atag[505];vector<int>ve[505];voi...
2018-06-18 15:07:06 379 2
原创 hdu 5155
#include<cstdio>#include<cstring>#define mod 1000000007using namespace std;int n,m;long long dp[55][55];long long fac[55],inv[55];void initiate(){ fac[0]=inv[0]=1; for(int i=1;i<=54;i++...
2018-06-17 23:52:00 275
原创 猴子 lnsyoj
#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int g[5005],b[5005],d,m,n;int dp[5005][5005];int q[5005];int flag;int head,tail;int main(){ scanf("%d%d%d",&am...
2018-06-16 16:38:55 493 1
原创 烽火传递
#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int n,m;int h[1000005];int dp[1000005],q[1000005];int main(){ scanf("%d%d",&n,&m); for(int i=1;i<=n...
2018-06-16 15:07:36 339
原创 poj3461
#include<cstdio>#include<cstring>using namespace std;const int SEED=13131;unsigned long long s[1000005];unsigned long long p[1000005];int n;bool examin(int pos,unsigned long long s[],unsig...
2018-06-14 15:15:14 194
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人