0_0_20612076_2944.cpp:6:5: error: expected unqualified-id before '>' token
> T; int casee = 1; while(T --) { init(); cin >> n >> m >> st >> k; for(int i=1; i<=n; i++) dp[i] = INF; getchar(); int aa,bb,cc; scanf("%s",a); for(int i=1; i<=m; i++) { scanf("%d%d%d",&aa,&bb,&cc); add(aa,bb,cc); } printf("Case %d: ",casee++); dfs(st,st,0); int flag = 0,ind,ans = INF; for(int i=1; i<=n; i++) { if(dp[i] != INF) { flag = 1; if(ans > dp[i]) { ans = dp[i]; ind = i; } } } if(flag) printf("%d %d\n",ans,ind); else printf("-1 -1\n"); } return 0;}
^
0_0_20612076_2944.cpp:6:31: error: expected unqualified-id before 'while'
> T; int casee = 1; while(T --) { init(); cin >> n >> m >> st >> k; for(int i=1; i<=n; i++) dp[i] = INF; getchar(); int aa,bb,cc; scanf("%s",a); for(int i=1; i<=m; i++) { scanf("%d%d%d",&aa,&bb,&cc); add(aa,bb,cc); } printf("Case %d: ",casee++); dfs(st,st,0); int flag = 0,ind,ans = INF; for(int i=1; i<=n; i++) { if(dp[i] != INF) { flag = 1; if(ans > dp[i]) { ans = dp[i]; ind = i; } } } if(flag) printf("%d %d\n",ans,ind); else printf("-1 -1\n"); } return 0;}
^
|