F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_19225454_2168.cpp:13:7: error: 'll' does not name a type
 const ll inf = (1ll)<<50;int t, n, m, s, a, i, j, u, v, w, now, tmp1, tmp2;int dis[maxn][maxn];ll best[maxn];ll cost, k21, k22;bool vis[maxn];int head, tail;int q[maxn*maxn];bool flag;
       ^
0_0_19225454_2168.cpp:13:96: error: 'll' does not name a type
 const ll inf = (1ll)<<50;int t, n, m, s, a, i, j, u, v, w, now, tmp1, tmp2;int dis[maxn][maxn];ll best[maxn];ll cost, k21, k22;bool vis[maxn];int head, tail;int q[maxn*maxn];bool flag;
                                                                                                ^
0_0_19225454_2168.cpp:13:110: error: 'll' does not name a type
 const ll inf = (1ll)<<50;int t, n, m, s, a, i, j, u, v, w, now, tmp1, tmp2;int dis[maxn][maxn];ll best[maxn];ll cost, k21, k22;bool vis[maxn];int head, tail;int q[maxn*maxn];bool flag;
                                                                                                              ^
0_0_19225454_2168.cpp: In function 'int main()':
0_0_19225454_2168.cpp:14:318: error: 'best' was not declared in this scope
 int main() { scanf("%d", &t); for (int cases = 1; cases <= t; cases++) { scanf("%d %d %d %d", &n, &m, &s, &a); for (i = 0; i < n; i++) for (j = 0; j < n; j++) dis[i][j] = -1;  for (i = 0; i < m; i++) { scanf("%d %d %d", &u, &v, &w); dis[u][v] = dis[v][u] = w; }  head = 1; tail = 1; q[1] = a; for (i = 0; i < n; i++) best[i] = inf; for (i = 0; i < n; i++) vis[i] = false;  best[a] = 0;vis[a] = true; while (head <= tail) { now = q[head]; for (i = 0; i < n; i++) if ((dis[now][i] != -1) && (dis[now][i]*3 <= s)) { if ( best[now]+3*dis[now][i] <= s) { cost = best[now]+2*dis[now][i];  flag = true; } else { tmp1 = s-3*dis[now][i];  tmp2 = s-5*dis[now][i];  if(tmp2 > 0){  k21 = (best[now]-tmp1)/tmp2;  k22 = (best[now]-tmp1)%tmp2; cost = 1ll*(s-dis[now][i])*(1+k21)+1ll*(k22!=0)*(k22+4*dis[now][i]); flag = true; } else flag = false;  } if (flag && cost < best[i]){ best[i] = cost; if (!vis[i]) { vis[i] = true; q[++tail] = i; } } } head++; vis[now] = false; } if (best[0] == inf) { printf("Case %d: Poor princess, we will miss you!\n", cases); } else { printf("Case %d: %I64d\n", cases, best[0]); } }}
                                                                                                                                                                                                                                                                                                                              ^
0_0_19225454_2168.cpp:14:328: error: 'inf' was not declared in this scope
 int main() { scanf("%d", &t); for (int cases = 1; cases <= t; cases++) { scanf("%d %d %d %d", &n, &m, &s, &a); for (i = 0; i < n; i++) for (j = 0; j < n; j++) dis[i][j] = -1;  for (i = 0; i < m; i++) { scanf("%d %d %d", &u, &v, &w); dis[u][v] = dis[v][u] = w; }  head = 1; tail = 1; q[1] = a; for (i = 0; i < n; i++) best[i] = inf; for (i = 0; i < n; i++) vis[i] = false;  best[a] = 0;vis[a] = true; while (head <= tail) { now = q[head]; for (i = 0; i < n; i++) if ((dis[now][i] != -1) && (dis[now][i]*3 <= s)) { if ( best[now]+3*dis[now][i] <= s) { cost = best[now]+2*dis[now][i];  flag = true; } else { tmp1 = s-3*dis[now][i];  tmp2 = s-5*dis[now][i];  if(tmp2 > 0){  k21 = (best[now]-tmp1)/tmp2;  k22 = (best[now]-tmp1)%tmp2; cost = 1ll*(s-dis[now][i])*(1+k21)+1ll*(k22!=0)*(k22+4*dis[now][i]); flag = true; } else flag = false;  } if (flag && cost < best[i]){ best[i] = cost; if (!vis[i]) { vis[i] = true; q[++tail] = i; } } } head++; vis[now] = false; } if (best[0] == inf) { printf("Case %d: Poor princess, we will miss you!\n", cases); } else { printf("Case %d: %I64d\n", cases, best[0]); } }}
                                                                                                                                                                                                                                                                                                                                        ^
0_0_19225454_2168.cpp:14:374: error: 'best' was not declared in this scope
 int main() { scanf("%d", &t); for (int cases = 1; cases <= t; cases++) { scanf("%d %d %d %d", &n, &m, &s, &a); for (i = 0; i < n; i++) for (j = 0; j < n; j++) dis[i][j] = -1;  for (i = 0; i < m; i++) { scanf("%d %d %d", &u, &v, &w); dis[u][v] = dis[v][u] = w; }  head = 1; tail = 1; q[1] = a; for (i = 0; i < n; i++) best[i] = inf; for (i = 0; i < n; i++) vis[i] = false;  best[a] = 0;vis[a] = true; while (head <= tail) { now = q[head]; for (i = 0; i < n; i++) if ((dis[now][i] != -1) && (dis[now][i]*3 <= s)) { if ( best[now]+3*dis[now][i] <= s) { cost = best[now]+2*dis[now][i];  flag = true; } else { tmp1 = s-3*dis[now][i];  tmp2 = s-5*dis[now][i];  if(tmp2 > 0){  k21 = (best[now]-tmp1)/tmp2;  k22 = (best[now]-tmp1)%tmp2; cost = 1ll*(s-dis[now][i])*(1+k21)+1ll*(k22!=0)*(k22+4*dis[now][i]); flag = true; } else flag = false;  } if (flag && cost < best[i]){ best[i] = cost; if (!vis[i]) { vis[i] = true; q[++tail] = i; } } } head++; vis[now] = false; } if (best[0] == inf) { printf("Case %d: Poor princess, we will miss you!\n", cases); } else { printf("Case %d: %I64d\n", cases, best[0]); } }}
                                                                                                                                                                                                                                                                                                                                                                                      ^
0_0_19225454_2168.cpp:14:551: error: 'cost' was not declared in this scope
 int main() { scanf("%d", &t); for (int cases = 1; cases <= t; cases++) { scanf("%d %d %d %d", &n, &m, &s, &a); for (i = 0; i < n; i++) for (j = 0; j < n; j++) dis[i][j] = -1;  for (i = 0; i < m; i++) { scanf("%d %d %d", &u, &v, &w); dis[u][v] = dis[v][u] = w; }  head = 1; tail = 1; q[1] = a; for (i = 0; i < n; i++) best[i] = inf; for (i = 0; i < n; i++) vis[i] = false;  best[a] = 0;vis[a] = true; while (head <= tail) { now = q[head]; for (i = 0; i < n; i++) if ((dis[now][i] != -1) && (dis[now][i]*3 <= s)) { if ( best[now]+3*dis[now][i] <= s) { cost = best[now]+2*dis[now][i];  flag = true; } else { tmp1 = s-3*dis[now][i];  tmp2 = s-5*dis[now][i];  if(tmp2 > 0){  k21 = (best[now]-tmp1)/tmp2;  k22 = (best[now]-tmp1)%tmp2; cost = 1ll*(s-dis[now][i])*(1+k21)+1ll*(k22!=0)*(k22+4*dis[now][i]); flag = true; } else flag = false;  } if (flag && cost < best[i]){ best[i] = cost; if (!vis[i]) { vis[i] = true; q[++tail] = i; } } } head++; vis[now] = false; } if (best[0] == inf) { printf("Case %d: Poor princess, we will miss you!\n", cases); } else { printf("Case %d: %I64d\n", cases, best[0]); } }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
0_0_19225454_2168.cpp:14:671: error: 'k21' was not declared in this scope
 int main() { scanf("%d", &t); for (int cases = 1; cases <= t; cases++) { scanf("%d %d %d %d", &n, &m, &s, &a); for (i = 0; i < n; i++) for (j = 0; j < n; j++) dis[i][j] = -1;  for (i = 0; i < m; i++) { scanf("%d %d %d", &u, &v, &w); dis[u][v] = dis[v][u] = w; }  head = 1; tail = 1; q[1] = a; for (i = 0; i < n; i++) best[i] = inf; for (i = 0; i < n; i++) vis[i] = false;  best[a] = 0;vis[a] = true; while (head <= tail) { now = q[head]; for (i = 0; i < n; i++) if ((dis[now][i] != -1) && (dis[now][i]*3 <= s)) { if ( best[now]+3*dis[now][i] <= s) { cost = best[now]+2*dis[now][i];  flag = true; } else { tmp1 = s-3*dis[now][i];  tmp2 = s-5*dis[now][i];  if(tmp2 > 0){  k21 = (best[now]-tmp1)/tmp2;  k22 = (best[now]-tmp1)%tmp2; cost = 1ll*(s-dis[now][i])*(1+k21)+1ll*(k22!=0)*(k22+4*dis[now][i]); flag = true; } else flag = false;  } if (flag && cost < best[i]){ best[i] = cost; if (!vis[i]) { vis[i] = true; q[++tail] = i; } } } head++; vis[now] = false; } if (best[0] == inf) { printf("Case %d: Poor princess, we will miss you!\n", cases); } else { printf("Case %d: %I64d\n", cases, best[0]); } }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^
0_0_19225454_2168.cpp:14:701: error: 'k22' was not declared in this scope
 int main() { scanf("%d", &t); for (int cases = 1; cases <= t; cases++) { scanf("%d %d %d %d", &n, &m, &s, &a); for (i = 0; i < n; i++) for (j = 0; j < n; j++) dis[i][j] = -1;  for (i = 0; i < m; i++) { scanf("%d %d %d", &u, &v, &w); dis[u][v] = dis[v][u] = w; }  head = 1; tail = 1; q[1] = a; for (i = 0; i < n; i++) best[i] = inf; for (i = 0; i < n; i++) vis[i] = false;  best[a] = 0;vis[a] = true; while (head <= tail) { now = q[head]; for (i = 0; i < n; i++) if ((dis[now][i] != -1) && (dis[now][i]*3 <= s)) { if ( best[now]+3*dis[now][i] <= s) { cost = best[now]+2*dis[now][i];  flag = true; } else { tmp1 = s-3*dis[now][i];  tmp2 = s-5*dis[now][i];  if(tmp2 > 0){  k21 = (best[now]-tmp1)/tmp2;  k22 = (best[now]-tmp1)%tmp2; cost = 1ll*(s-dis[now][i])*(1+k21)+1ll*(k22!=0)*(k22+4*dis[now][i]); flag = true; } else flag = false;  } if (flag && cost < best[i]){ best[i] = cost; if (!vis[i]) { vis[i] = true; q[


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 17:53:58, Gzip enabled