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 jiaozhua at 2016-02-26 16:48:06 on Problem 3259
WA了好几次才发现。。。QAQ


一开始我直接分 M 和 W 输入,一直WA,
后来判断了一下再输就A了

        for(i=1;i<=m;i++)
        {
            scanf("%d%d%d",&a,&b,&c);
           if (map[a][b])
				map[a][b]=min(map[a][b],c);
			else map[a][b]=c;
			if (map[b][a])
				map[b][a]=min(map[b][a],c);
			else map[b][a]=c;
        }
        for(i=1;i<=w;i++)
        {
            scanf("%d%d%d",&a,&b,&c);
            if (map[a][b])
				map[a][b]=min(map[a][b],-c);
			else map[a][b]=-c;
        }

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