http://poj.org/problem?id=1125
#include#include using namespace std;int d[101][101];// dag ATTENTIONint num[101];//the number of contractsint edge[101][101];// adjecent edge tableint n;//always represent the maxnum of single databool input(){ if((cin>>n)==NULL)return false; if(n==0)return false; for(int i=0;i >num[i]; int temp; for(int j=0;j >temp; temp--; edge[i][j]=temp; cin>>d[i][temp]; } } return true;}void solve(){ for(int k=0;k maxn){ ansn=i; ans=maxn; } } cout< <<" "< <<"\n";}int main(){ while(input()){ solve(); } return 0;}