- 博客(13)
- 问答 (1)
- 收藏
- 关注
原创 哈尔滨理工大学软件学院 1450 经商 (易错并查集+01背包)
#include#include#includeusing namespace std;const int maxn=1e6+5;int fa[maxn];int u[maxn];int v[maxn];int n,m,c;int T[maxn];int dp[maxn];int rank1[10005];void init(){ for(int i=1; i<
2016-11-21 20:57:39 165
原创 哈尔滨理工大学软件学院OJ 1451 经商(大树/ 斐波那契数列)
#include#include#includeusing namespace std;struct node{ long long a[3][3];}T;const int MOD=1000000007;node muli(node x,node y){ node temp; for(int i=1;i<=2;i++) { fo
2016-11-21 20:53:31 1527
原创 HDU 4508 湫湫系列故事——减肥记I (完全背包)
#include#include#includeusing namespace std;const int maxn=105;struct node{ int a,b;}T[maxn];int dp[100005];int main(){ int n; while(~scanf("%d",&n)) { memset(dp,0,s
2016-11-15 21:42:22 393
原创 HDU 2546 饭卡 (01背包)
#include#include#includeusing namespace std;int a[1005];int dp[1005][1005];int main(){ int n; while(~scanf("%d",&n)) { if(n==0) return 0; memset(dp,0,sizeof(dp));
2016-11-15 21:12:55 297
原创 哈尔滨理工大学软件学院OJ 1419: 最大的XⅡ
#include#include#includeusing namespace std;int n,m;char maps[1005][1005];int main(){ while(~scanf("%d%d",&n,&m)) { for(int i=1; i<=n; i++) { scanf("%s",map
2016-11-14 17:41:57 1652
原创 HDU 1022 Train Problem I (stack)
#include#include#include#include#include#include#includeusing namespace std;char a[100005];char b[100005];stackQ1;stackQ2;int stra,strb;int judge(){ stra=strlen(a),strb=strlen(b);
2016-11-10 18:24:37 310
原创 HDU 2094 产生冠军 (不重复集合set)
#include#include#include#include#include#include#includeusing namespace std;int main(){ int t; while(~scanf("%d",&t)) { if(t==0) return 0; string a,b; s
2016-11-10 14:48:34 302
原创 PJ 2566 Bound Found (尺取法)
#include#include#includeusing namespace std;const int maxn=1e5+5;int n,k;pairE[maxn];int solve(int x)//尺取法并不是简单的暴力{ int l=0,r=1; int dis=1e9+5,ui,op; int ans; while(l<=n&&r<=
2016-11-08 21:53:32 305
原创 POJ 3320 Jessica's Reading Problem (尺取法)
#include#include#include#include#includeusing namespace std;int a[1000005];int main(){ int t; while(~scanf("%d",&t)) { setT; mapE; for(int i=1; i<=t; i++)
2016-11-07 16:53:57 262
原创 HDU 5154 Harry and Magical Computer (Floyd)
#include#include#includeusing namespace std;int maps[105][105];int n,m;int main(){ while(~scanf("%d%d",&n,&m)) { memset(maps,0,sizeof(maps)); int flag=0; for(in
2016-11-06 21:48:28 362
原创 HDU 5154 Harry and Magical Computer (强连通分量)
#include#include#include#include#includeusing namespace std;const int maxn=1005;vectorG[maxn];int pre[maxn],lowlink[maxn],sccno[maxn],dfs_clock,scc_cnt;stackS;int n,m;void dfs(int u)//大白的
2016-11-06 21:37:52 395
原创 HDU 5154 Harry and Magical Computer (拓扑排序)
#include#includeusing namespace std;int degree[505],res[505];bool maps[505][505];int n,m;void topo() //直接抄板子。{ int p; for(int i=1; i<=n; i++) { p=-1; for(int j
2016-11-06 15:40:53 372
原创 HDU 5154 Harry and Magical Computer (BFS)
#include#include#include#includeusing namespace std;int n,m;int maps[105][105];int book[105];int main(){ while(~scanf("%d%d",&n,&m)) { memset(maps,0,sizeof(maps)); me
2016-11-06 00:30:01 340
空空如也
小白求助!!!opencv 怎样将一张图片上蓝色点的坐标输出出来???
2016-12-07
TA创建的收藏夹 TA关注的收藏夹
TA关注的人