|
一
遍 排 序
题目 1593 [HZOI 2014] 采姑娘的小蘑菇
2014-04-24 20:54:55
|
|
题目 1593 [HZOI 2014] 采姑娘的小蘑菇
2014-04-24 20:44:52
|
|
膜拜大卿神!!!!
|
|
飞一般的感觉
|
|
VIP 直接从POj粘下来的代码超时了,后来发现没有多组数据......
题目 1168 机器调度
2014-04-24 20:31:44
|
|
s的范围似乎有缺漏...好像是(0,100];
题目 95 [NOIP 2001]Car的旅行路线
2014-04-24 19:30:37
|
|
题目 727 [网络流24题] 太空飞行计划
2014-04-24 18:10:45
|
|
题目 750 栅格网络流
2014-04-24 17:55:58
|
|
回复 @digital-T :
谢谢神犇,你代码中的F我猜应该是记录的天数吧,具体细节有些不太理解的地方.这道题网上用原题搜索找不到解题报告(可能是我方法有问题吧),如果神犇有时间的话不知是否可以写篇题解点拨下蒟蒻,非常感谢 ![]()
题目 749 电子书狂热者
2014-04-24 17:51:31
|
|
题目 751 螺旋方阵
2014-04-24 17:27:29
|
|
|
|
VIP是不是要有spj啊????为毛最短路不行,只能最长路
|
|
VIP上面的2b不要再刷了,2不2啊
题目 1309 [HAOI 2006]受欢迎的牛
2014-04-24 16:03:41
|
|
|
|
题目 1309 [HAOI 2006]受欢迎的牛
2014-04-24 15:19:18
|
|
#include<cstdio>
#include<cstring> #include<iostream> using namespace std; struct sky { int ff,tt,next; }; sky c[50005]; int _[10005],__[10005],___[10005],____[10005],_____[10005]; int ______[50005]; bool v[50005]; int n,m,top,now,colors,ans,tot,ret; char ch; inline void add(int x,int y) { tot++; c[tot].ff=x; c[tot].tt=y; c[tot].next=______[x]; ______[x]=tot; } inline int read() { while (!isdigit(ch = getchar())); ret = ch-48; while (isdigit(ch = getchar())) (ret *= 10) += ch-48; return ret; } void tarjan(int x) { now++; _[x]=__[x]=now; ___[++top]=x; v[x]=1; for (int i=______[x];i;i=c[i].next) { if (!_[c[i].tt]) { tarjan(c[i].tt); __[x]=min(__[x],__[c[i].tt]); } else { if (v[x]) { __[x]=min(__[x],_[c[i].tt]); } } } if (__[x]==_[x]) { colors++; while (___[top+1]!=x) { ____[___[top]]=colors; _____[colors]++; v[___[top]]=0; top--; } } } int main() { freopen("cow.in","r",stdin); freopen("cow.out","w",stdout); n = read(); m = read(); memset(______,0,sizeof(______)); tot=0; for (int i=1;i<=m;i++) { int x,y; x=read();y=read(); add(x,y); } now=top=colors=0; memset(_____,0,sizeof(_____)); memset(_,0,sizeof(_)); memset(v,0,sizeof(v)); for (int i=1;i<=n;i++) { if (_[i]) continue; tarjan(i); } memset(v,1,sizeof(v)); for (int i=1;i<=tot;i++) { if (____[c[i].ff]==____[c[i].tt]) continue; v[____[c[i].ff]]=0; } ans=0; for (int i=1;i<=colors;i++) { if (v[i]) { if (ans) { printf("0"); return 0; } ans=_____[i]; } } printf("%d",ans); } |
|
这成了机房里的竞速题了- -
题目 1309 [HAOI 2006]受欢迎的牛
2014-04-24 15:04:53
|
|
VIP额,用BST秒过
|
|
解方程组....忘了变元.....逗比地调了仨小时...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
题目 1371 [HAOI 2013]开关控制
2014-04-24 12:10:15
|
|
细节哟~
|