hihoCoder
文章平均质量分 61
Fistice
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hihoCoder 1394 : 网络流四·最小路径覆盖 (网络流学习#4 记录)
题目链接:http://hihocoder.com/problemset/problem/1394 代码:#includeusing namespace std;const int N=505*2+10,M=20005,INF=0x3f3f3f3f;int n,m;int c[N][N],pre[N];int s,t;int bfs(){原创 2016-10-13 21:32:06 · 333 阅读 · 0 评论 -
hihoCoder 1393 网络流三·二分图多重匹配 (网络流学习#3 记录)
题目链接:http://hihocoder.com/problemset/problem/1393 话说我之前一直不知道二分匹配可以用网络流做。。。#include#include#includeusing namespace std;const int N=205;struct ss{int v,c,nxt;} e[N*20];int head原创 2016-10-13 21:32:04 · 397 阅读 · 0 评论 -
hihoCoder 1378 网络流二·最大流最小割定理 (网络流学习#2 记录)
题目链接:http://hihocoder.com/problemset/problem/1378 代码:#includeusing namespace std;const int maxn=505;int c[maxn][maxn],pre[maxn],flow[maxn][maxn],INF=0x3f3f3f3f,n,vis[maxn]={0},flag=0,n原创 2016-10-13 21:32:01 · 443 阅读 · 0 评论 -
hihoCoder 1369 网络流一·Ford-Fulkerson算法 (网络流学习#1 记录)
题目链接:http://hihocoder.com/problemset/problem/1369代码:#include#include#include#include#include#define INF 0x3f3f3f3fusing namespace std;int mp[505][506]={0};bool visit[506];int原创 2016-10-13 21:31:58 · 364 阅读 · 0 评论 -
hihocoder # Total Hamming Distance
题目:http://hihocoder.com/contest/hihointerview22/problem/2 题意: The Hamming Distance 是指两个整数二进制数字不同的个数。给出n和n个数,求每两个数之间的The Hamming Distance 的总和。 分析: 数据范围是 For 80% of the data: 1 <= N <= 1000 For原创 2016-11-02 18:44:53 · 711 阅读 · 0 评论 -
hihocoder # Inventory is Full(记录,优先队列维护)
题目链接:http://hihocoder.com/contest/hihointerview22/problem/1 题意: 有m种财宝,第i种财宝有ai个,只能存放在与其相匹配的栈中,有n个插槽,每个插槽可以放一个栈,一共m种栈,每种栈有无限个。给出每个栈的最大大小(表示每个栈可以存放的数量)再给出每种财宝的单个价值。问可以获得的最大价值。思想:是贪心吧,关键点就是注意不足一个栈的最大容量也原创 2016-11-02 18:15:17 · 849 阅读 · 0 评论 -
hihoCoder#1032 : 最长回文子串
题意:给出一个字符串,求该字符串的最大回文子串。(子串指的是一个串中连续的部分,子序列是可以不连续的。) 题目链接 代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e6+5;char s[maxn],str[maxn];int p[2*maxn];void work(原创 2017-03-05 20:05:41 · 325 阅读 · 0 评论
分享