- 博客(9)
- 收藏
- 关注
原创 BestCoder Round #1
1001->点我传送<- #include <iostream>#include <cstdio>#include <cstring>#include <queue>#include <stack>using namespace std;const int maxn=100005;const ...
2016-07-31 23:40:14 300
原创 BestCoder Round #26
1001 Have meal->点我传送<- #include<iostream>#include<cstring>#include<cstdio>using namespace std;int main(){ int n,m; while(~scanf("%d%d",&n,&m)){ ...
2016-07-31 23:32:47 405
原创 BestCoder Round #25
刚进行过图论的练习,试着用图论的方法做了一下,挺有意思的!1001题->点我传送<- #include<iostream>#include<cstdio>#include<cstring>#include<queue>using namespace std;const int maxn=10005;co...
2016-07-31 23:14:44 385
原创 hdu 3631
hdu 3631 -->点我传送<-- #include<iostream>#include<cstring>#include<cstdio>using namespace std;const int maxn=305;const int inf=0x3f3f3f3f;int n;int dis[maxn][...
2016-07-25 14:37:07 470
原创 hdu3790
#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int maxn=1005;const int inf=0x3f3f3f3f;int mp[maxn][maxn],mpp[maxn][maxn];int dis[maxn],...
2016-07-25 12:16:21 476
原创 hdu 1548
#include<iostream>#include<cstdio>#include<cstring>using namespace std;int n;const int maxn=205;const int inf=0x3f3f3f3f;int vis[maxn],dis[maxn];int mp[maxn][maxn];...
2016-07-25 09:15:20 307
原创 hdu 1874
#include<iostream>#include<cstdio>using namespace std;const int maxn=1005;const int maxm=205;const int inf=0x3f3f3f3f;int n,m,s,t;struct Edge{ int u,v,w;}edg[maxn];void bell...
2016-07-23 13:28:16 334
原创 扩展欧几里得算法
扩展欧几里得算法int ex_gcd(int a,int b,int &x,int &y){ if(!b){ x=1,y=0; return a; } int ans=ex_gcd(b,a%b,x,y); int t=x; x=y; y=t-a/b*y;}从最终状态反推到最初的状态:假设当前我们要处理的是求
2016-07-19 11:57:36 298
原创 大数运算c++
大数加法string add(string s1,string s2){ if(s1.length()<s2.length()){ string temp=s1; s1=s2; s2=temp; } int i,j; for(i=s1.length()-1,j=s2.length()-1;i>=0;i--,j--
2016-07-18 07:49:10 491
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人