- 博客(7)
- 收藏
- 关注
原创 sdut 2170 The Largest SCC(山东第二届省赛)
#include #include #include #define N 1005 #define M 20005 using namespace std; struct node{ int to,next; }edge[M]; int head[N],tot; int dfn[N],low[N],stap[N],belong[N]; bool instack[N]; int indexx
2014-04-25 18:14:41 616
原创 poj 1236 Network of Schools
#include #include #include #define N 110 #define M 5010 using namespace std; struct node{ int to,next; }edge[M]; int head[N],tot; int dfn[N],low[N],stap[N],belong[N]; int in[N],out[N]; bool instac
2014-04-22 19:01:14 435
原创 poj 2762 Going from u to v or from v to u?
tarjan算法学习 https://www.byvoid.com/blog/scc-tarjan/
2014-04-22 18:59:50 607
原创 hdu 4739 Zhuge Liang's Mines
#include #include #include #include #include using namespace std; struct node{ int x,y; }a[22]; vector mine; int dp[(1<<20)+2]; int n; bool cmp(node a,node b){ if(a.x==b.x) return a.y
2014-04-21 18:30:20 563
原创 poj 3624 01背包 水
水 #include #include using namespace std; int dp[12890]={0}; int main(){ int n,m; int w,d; scanf("%d%d",&n,&m); for(int i=1;i<=n;i++){ scanf("%d%d",&w,&d); for(int j=m;j>=w;j--) if(dp[j-w]+
2014-04-16 14:28:39 394
原创 poj 1948 Triangular Pastures
#include #include #include #include using namespace std; bool dp[45][800][800]; int a[45]; int main(){ int n,i,j,k; int total=0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&a[i]); total+=a[
2014-04-14 19:53:15 494
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人