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 first at 2006-04-13 11:27:14 on Problem 1158
In Reply To:scanf也出问题阿 Posted by:first at 2006-04-13 01:26:09
> 很简单的一个程序
> #include <iostream>
> #include <algorithm>
> #include <vector>
> using namespace std;
> 
> #define min(a, b)  ((a) < (b) ? (a):(b))
> #define max(a, b)  ((a) > (b) ? (a):(b))
> 
>                                                                                                                        
> #define  NMAX 301
> 
> 
> struct junction
> {
>    char C;
>    int tc;
>    int tb;
>    int tp;
>    int t;
>    int id;
>    bool comp;
>    bool done;
> };
> 
> int src, des;
> int N, M;
> junction node[NMAX];                                                                                                                        
> 
> int  main()
> {
> 	 scanf("%d, %d", &src, &des);
>      scanf("%d, %d", &N, &M);
> 	 int i;
> 	 for(i = 1; i <= N; i ++)
> 	 {					
> 		 scanf("%c %d %d %d", &node[i].C, &node[i].tc, &node[i].tb, &node[i].tp);
> 		 printf("%c %d %d %d\n", node[i].C, node[i].tc, node[i].tb, node[i].tp);
> 	  	 node[i].t = 1000000000;
> 		 node[i].id = i;
> 		 node[i].comp = false;
> 		 node[i].done = false;
> 	 }
>      return 0;
> }                             
> 大家输入那个sample 看看, 输出的根本不的。 不知道出哪方面问题了 最后还是用cin过了这题

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