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_20990200_963.cpp:1:31: error: stray '#' in program
 <span style="font-size:12px;">#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 200;  int a[MAXN]; int n;  int main() {  while (scanf("%d", &n) != EOF) {   memset(a, 0, sizeof(a));   a[50] = n;   int flag = 1;   while (flag) {    flag = 0;    for (int i = 0; i < 100; i++)      if (a[i] && a[i+1]) {      int Min = min(a[i], a[i+1]);      a[i+2] += Min;      a[i] -= Min;      a[i+1] -= Min;      flag = 1;     }     for (int i = 2; i < 100; i++)      if (a[i] > 1) {      a[i-2] += a[i]/2;      a[i+1] += a[i]/2;      a[i] %= 2;      flag = 1;     }   }   int st,ed;   for (int i = 100; i >= 0; i--)    if (a[i]) {     st = i;     break;    }   for (int i = 0; i < 100; i++)     if (a[i]) {     ed = i;     break;    }   for (int i = st; i >= ed; i--) {    if (i == 49)     printf(".");    printf("%d", a[i]);   }   printf("n");  }  return 0; }</span>
                               ^
0_0_20990200_963.cpp:1:51: error: stray '#' in program
 <span style="font-size:12px;">#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 200;  int a[MAXN]; int n;  int main() {  while (scanf("%d", &n) != EOF) {   memset(a, 0, sizeof(a));   a[50] = n;   int flag = 1;   while (flag) {    flag = 0;    for (int i = 0; i < 100; i++)      if (a[i] && a[i+1]) {      int Min = min(a[i], a[i+1]);      a[i+2] += Min;      a[i] -= Min;      a[i+1] -= Min;      flag = 1;     }     for (int i = 2; i < 100; i++)      if (a[i] > 1) {      a[i-2] += a[i]/2;      a[i+1] += a[i]/2;      a[i] %= 2;      flag = 1;     }   }   int st,ed;   for (int i = 100; i >= 0; i--)    if (a[i]) {     st = i;     break;    }   for (int i = 0; i < 100; i++)     if (a[i]) {     ed = i;     break;    }   for (int i = st; i >= ed; i--) {    if (i == 49)     printf(".");    printf("%d", a[i]);   }   printf("n");  }  return 0; }</span>
                                                   ^
0_0_20990200_963.cpp:1:69: error: stray '#' in program
 <span style="font-size:12px;">#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 200;  int a[MAXN]; int n;  int main() {  while (scanf("%d", &n) != EOF) {   memset(a, 0, sizeof(a));   a[50] = n;   int flag = 1;   while (flag) {    flag = 0;    for (int i = 0; i < 100; i++)      if (a[i] && a[i+1]) {      int Min = min(a[i], a[i+1]);      a[i+2] += Min;      a[i] -= Min;      a[i+1] -= Min;      flag = 1;     }     for (int i = 2; i < 100; i++)      if (a[i] > 1) {      a[i-2] += a[i]/2;      a[i+1] += a[i]/2;      a[i] %= 2;      flag = 1;     }   }   int st,ed;   for (int i = 100; i >= 0; i--)    if (a[i]) {     st = i;     break;    }   for (int i = 0; i < 100; i++)     if (a[i]) {     ed = i;     break;    }   for (int i = st; i >= ed; i--) {    if (i == 49)     printf(".");    printf("%d", a[i]);   }   printf("n");  }  return 0; }</span>
                                                                     ^
0_0_20990200_963.cpp:1:88: error: stray '#' in program
 <span style="font-size:12px;">#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 200;  int a[MAXN]; int n;  int main() {  while (scanf("%d", &n) != EOF) {   memset(a, 0, sizeof(a));   a[50] = n;   int flag = 1;   while (flag) {    flag = 0;    for (int i = 0; i < 100; i++)      if (a[i] && a[i+1]) {      int Min = min(a[i], a[i+1]);      a[i+2] += Min;      a[i] -= Min;      a[i+1] -= Min;      flag = 1;     }     for (int i = 2; i < 100; i++)      if (a[i] > 1) {      a[i-2] += a[i]/2;      a[i+1] += a[i]/2;      a[i] %= 2;      flag = 1;     }   }   int st,ed;   for (int i = 100; i >= 0; i--)    if (a[i]) {     st = i;     break;    }   for (int i = 0; i < 100; i++)     if (a[i]) {     ed = i;     break;    }   for (int i = st; i >= ed; i--) {    if (i == 49)     printf(".");    printf("%d", a[i]);   }   printf("n");  }  return 0; }</span>
                                                                                        ^
0_0_20990200_963.cpp:1:1: error: expected unqualified-id before '<' token
 <span style="font-size:12px;">#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 200;  int a[MAXN]; int n;  int main() {  while (scanf("%d", &n) != EOF) {   memset(a, 0, sizeof(a));   a[50] = n;   int flag = 1;   while (flag) {    flag = 0;    for (int i = 0; i < 100; i++)      if (a[i] && a[i+1]) {      int Min = min(a[i], a[i+1]);      a[i+2] += Min;      a[i] -= Min;      a[i+1] -= Min;      flag = 1;     }     for (int i = 2; i < 100; i++)      if (a[i] > 1) {      a[i-2] += a[i]/2;      a[i+1] += a[i]/2;      a[i] %= 2;      flag = 1;     }   }   int st,ed;   for (int i = 100; i >= 0; i--)    if (a[i]) {     st = i;     break;    }   for (int i = 0; i < 100; i++)     if (a[i]) {     ed = i;     break;    }   for (int i = st; i >= ed; i--) {    if (i == 49)     printf(".");    printf("%d", a[i]);   }   printf("n");  }  return 0; }</span>
 ^
0_0_20990200_963.cpp: In function 'int main()':
0_0_20990200_963.cpp:1:205: error: 'scanf' was not declared in this scope
 <span style="font-size:12px;">#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 200;  int a[MAXN]; int n;  int main() {  while (scanf("%d", &n) != EOF) {   memset(a, 0, sizeof(a));   a[50] = n;   int flag = 1;   while (flag) {    flag = 0;    for (int i = 0; i < 100; i++)      if (a[i] && a[i+1]) {      int Min = min(a[i], a[i+1]);      a[i+2] += Min;      a[i] -= Min;      a[i+1] -= Min;      flag = 1;     }     for (int i = 2; i < 100; i++)      if (a[i] > 1) {      a[i-2] += a[i]/2;      a[i+1] += a[i]/2;      a[i] %= 2;      flag = 1;     }   }   int st,ed;   for (int i = 100; i >= 0; i--)    if (a[i]) {     st = i;     break;    }   for (int i = 0; i < 100; i++)     if (a[i]) {     ed = i;     break;    }   for (int i = st; i >= ed; i--) {    if (i == 49)     printf(".");    printf("%d", a[i]);   }   printf("n");  }  return 0; }</span>
                                                                                                                                                                                                             ^
0_0_20990200_963.cpp:1:210: error: 'EOF' was not declared in this scope
 <span style="font-size:12px;">#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 200;  int a[MAXN]; int n;  int main() {  while (scanf("%d", &n) != EOF) {   memset(a, 0, sizeof(a));   a[50] = n;   int flag = 1;   while (flag) {    flag = 0;    for (int i = 0; i < 100; i++)      if (a[i] && a[i+1]) {      int Min = min(a[i], a[i+1]);      a[i+2] += Min;      a[i] -= Min;      a[i+1] -= Min;      flag = 1;     }     for (int i = 2; i < 100; i++)      if (a[i] > 1) {      a[i-2] += a[i]/2;      a[i+1] += a[i]/2;      a[i] %= 2;      flag = 1;     }   }   int st,ed;   for (int i = 100; i >= 0; i--)    if (a[i]) {     st = i;     break;    }   for (int i = 0; i < 100; i++)     if (a[i]) {     ed = i;     break;    }   for (int i = st; i >= ed; i--) {    if (i == 49)     printf(".");    printf("%d", a[i]);   }   printf("n");  }  return 0; }</span>
                                                                                                                                                                                                                  ^
0_0_20990200_963.cpp:1:241: error: 'memset' was not declared in this scope
 <span style="font-size:12px;">#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 200;  int a[MAXN]; int n;  int main() {  while (scanf("%d", &n) != EOF) {   memset(a, 0, sizeof(a));   a[50] = n;   int flag = 1;   while (flag) {    flag = 0;    for (int i = 0; i < 100; i++)      if (a[i] && a[i+1]) {      int Min = min(a[i], a[i+1]);      a[i+2] += Min;      a[i] -= Min;      a[i+1] -= Min;      flag = 1;     }     for (int i = 2; i < 100; i++)      if (a[i] > 1) {      a[i-2] += a[i]/2;      a[i+1] += a[i]/2;      a[i] %= 2;      flag = 1;     }   }   int st,ed;   for (int i = 100; i >= 0; i--)    if (a[i]) {     st = i;     break;    }   for (int i = 0; i < 100; i++)     if (a[i]) {     ed = i;     break;    }   for (int i = st; i >= ed; i--) {    if (i == 49)     printf(".");    printf("%d", a[i]);   }   printf("n");  }  return 0; }</span>
                                                                                                                                                                                                                                                 ^
0_0_20990200_963.cpp:1:394: error: 'min' was not declared in this scope
 <span style="font-size:12px;">#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int MAXN = 200;  int a[MAXN]; int n;  int main() {  while (scanf("%d", &n) != EOF) {   memset(a, 0, sizeof(a));   a[50] = n;   int flag = 1;   while (flag) {    flag = 0;    for (int i = 0; i < 100; i++)      if (a[i] && a[i+1]) {      int Min = min(a[i], a[i+1]);      a[i+2] += Min;      a[i] -= Min;      a[i+1] -= Min;      flag = 1;     }     for (int i = 2; i < 100; i++)      if (a[i] > 1) {      a[i-2] += a[i]/2;      a[i+1] += a[i]/2;      a[i] %= 2;      flag = 1;     }   }   int st,ed;   for (int i = 100; i >= 0; i--)    if (a[i]) {     st = i;     break;    }   for (int i = 0; i < 100; i++)     if (a[i]) {     ed = i;     break;    }   for (int i = st; i >= ed; i--) {    if (i == 49)     printf(".");    printf("%d", a[i]);   }   printf("n");  }  return 0; }</span>
                                                                                                                                                                                                                                                                                                                                                      


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-26 13:09:49, Gzip enabled