版本比较
题解 P5045 【[SCOI2003]蜘蛛难题】
正文
增加 4 行删除 4 行
6 行未改动7891011111213141515 行未改动3132333435353637383910 行未改动505152535454555657585 行未改动6465666768686970717230 行未改动6 行未改动```cpp#include<cstdio>#include<iostream>#include<algorithm>using namespace std; using namespace std;struct node{ int x,y,h;}a[201];bool f[201];15 行未改动 edge[cnt].nxt=head[u]; edge[cnt].w=w; head[u]=cnt;}int main() int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) {10 行未改动 add(u,w,v); add(w,u,v); } scanf("%d%d",&x,&y); while(1) while(1) { bool ff=1; while(ff) {5 行未改动 for(int j=head[i];j;j=edge[j].nxt) { if(a[i].h<=edge[j].w&&!f[edge[j].to]) f[edge[j].to]=ff=1; } } } } } int maxn=0;30 行未改动