Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

求教这题144B的代码是怎么搞出来的?我只搞出来了301B就下不去了。附我的代码

Posted by tog at 2011-04-05 20:20:51 on Problem 2419
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator