Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
scanf也出问题阿很简单的一个程序 #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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator