Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
求教这题144B的代码是怎么搞出来的?我只搞出来了301B就下不去了。附我的代码#include<iostream> using namespace std; int h[110][110],p,t,d[110]; int main(){ cin>>p>>t; int s=p,sb1,sb2,i,j,k; for(;cin>>sb1>>sb2;)h[sb1][sb2]=1; for(i=1;i<=p;s-=d[i++]) for(j=i+1;j<=p&&!d[i];d[j]|=k==t+1,j++) for(k=1;k<=t;k++) if(h[i][k]^h[j][k])break; cout<<s; return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator