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

知道怎么个格式了。。。

Posted by djj2007 at 2008-02-29 15:06:02 on Problem 2485
根本就不需要什么一个空行,正常输出就行了!

void main()
{
    int k,m;
    scanf("%d",&k);
    int G[MAX][MAX];

    for(m=0;m<k;m++)
    {
        int n,i,j;
        scanf("%d",&n);
        for(i=0;i<n;i++)
            for(j=0;j<n;j++)
            {
                scanf("%d",&G[i][j]);
                if(i == j)
                    G[i][j] = INF;
            }
        int maxlength = prim(G,n);
        printf("%d\n",maxlength);
    }
}

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