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_20613024_29510.cpp:5:25: error: stray '#' in program
     using namespace std;#define N 50005#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define ls rt<<1#define rs rt<<1|1char st[50005];int the[30];int main() {    while (~scanf("%s", st)) {        memset(the, 0, sizeof(the));        int len = strlen(st);        bool flag = true;        int tot = 0;        for (int i = 0; i < len; ) {            char ch = st[i];            int k = i;            while (k < len && ch == st[k]) k++;            k = k - i;            if (k == 1 || k == 2) tot++;            else {                int t = 1, x = k;                while (x >= 2 * t) {                    x -= t;                    tot++; t++;                }                tot++;            }            i += k;            the[ch - 'A'] += k;        }        int num = tot;        if (st[0] == st[len - 1] && the[st[0] - 'A'] == 2) flag = false;        int lim = 2 * tot - 1; tot--;        if ((num & 1) && tot <= 0) flag = false;        if (!flag) puts("No");        else puts("Yes");    }}
                         ^
0_0_20613024_29510.cpp:5:40: error: stray '#' in program
     using namespace std;#define N 50005#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define ls rt<<1#define rs rt<<1|1char st[50005];int the[30];int main() {    while (~scanf("%s", st)) {        memset(the, 0, sizeof(the));        int len = strlen(st);        bool flag = true;        int tot = 0;        for (int i = 0; i < len; ) {            char ch = st[i];            int k = i;            while (k < len && ch == st[k]) k++;            k = k - i;            if (k == 1 || k == 2) tot++;            else {                int t = 1, x = k;                while (x >= 2 * t) {                    x -= t;                    tot++; t++;                }                tot++;            }            i += k;            the[ch - 'A'] += k;        }        int num = tot;        if (st[0] == st[len - 1] && the[st[0] - 'A'] == 2) flag = false;        int lim = 2 * tot - 1; tot--;        if ((num & 1) && tot <= 0) flag = false;        if (!flag) puts("No");        else puts("Yes");    }}
                                        ^
0_0_20613024_29510.cpp:5:62: error: stray '#' in program
     using namespace std;#define N 50005#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define ls rt<<1#define rs rt<<1|1char st[50005];int the[30];int main() {    while (~scanf("%s", st)) {        memset(the, 0, sizeof(the));        int len = strlen(st);        bool flag = true;        int tot = 0;        for (int i = 0; i < len; ) {            char ch = st[i];            int k = i;            while (k < len && ch == st[k]) k++;            k = k - i;            if (k == 1 || k == 2) tot++;            else {                int t = 1, x = k;                while (x >= 2 * t) {                    x -= t;                    tot++; t++;                }                tot++;            }            i += k;            the[ch - 'A'] += k;        }        int num = tot;        if (st[0] == st[len - 1] && the[st[0] - 'A'] == 2) flag = false;        int lim = 2 * tot - 1; tot--;        if ((num & 1) && tot <= 0) flag = false;        if (!flag) puts("No");        else puts("Yes");    }}
                                                              ^
0_0_20613024_29510.cpp:5:88: error: stray '#' in program
     using namespace std;#define N 50005#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define ls rt<<1#define rs rt<<1|1char st[50005];int the[30];int main() {    while (~scanf("%s", st)) {        memset(the, 0, sizeof(the));        int len = strlen(st);        bool flag = true;        int tot = 0;        for (int i = 0; i < len; ) {            char ch = st[i];            int k = i;            while (k < len && ch == st[k]) k++;            k = k - i;            if (k == 1 || k == 2) tot++;            else {                int t = 1, x = k;                while (x >= 2 * t) {                    x -= t;                    tot++; t++;                }                tot++;            }            i += k;            the[ch - 'A'] += k;        }        int num = tot;        if (st[0] == st[len - 1] && the[st[0] - 'A'] == 2) flag = false;        int lim = 2 * tot - 1; tot--;        if ((num & 1) && tot <= 0) flag = false;        if (!flag) puts("No");        else puts("Yes");    }}
                                                                                        ^
0_0_20613024_29510.cpp:5:104: error: stray '#' in program
     using namespace std;#define N 50005#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define ls rt<<1#define rs rt<<1|1char st[50005];int the[30];int main() {    while (~scanf("%s", st)) {        memset(the, 0, sizeof(the));        int len = strlen(st);        bool flag = true;        int tot = 0;        for (int i = 0; i < len; ) {            char ch = st[i];            int k = i;            while (k < len && ch == st[k]) k++;            k = k - i;            if (k == 1 || k == 2) tot++;            else {                int t = 1, x = k;                while (x >= 2 * t) {                    x -= t;                    tot++; t++;                }                tot++;            }            i += k;            the[ch - 'A'] += k;        }        int num = tot;        if (st[0] == st[len - 1] && the[st[0] - 'A'] == 2) flag = false;        int lim = 2 * tot - 1; tot--;        if ((num & 1) && tot <= 0) flag = false;        if (!flag) puts("No");        else puts("Yes");    }}
                                                                                                        ^
0_0_20613024_29510.cpp:5:26: error: 'define' does not name a type
     using namespace std;#define N 50005#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define ls rt<<1#define rs rt<<1|1char st[50005];int the[30];int main() {    while (~scanf("%s", st)) {        memset(the, 0, sizeof(the));        int len = strlen(st);        bool flag = true;        int tot = 0;        for (int i = 0; i < len; ) {            char ch = st[i];            int k = i;            while (k < len && ch == st[k]) k++;            k = k - i;            if (k == 1 || k == 2) tot++;            else {                int t = 1, x = k;                while (x >= 2 * t) {                    x -= t;                    tot++; t++;                }                tot++;            }            i += k;            the[ch - 'A'] += k;        }        int num = tot;        if (st[0] == st[len - 1] && the[st[0] - 'A'] == 2) flag = false;        int lim = 2 * tot - 1; tot--;        if ((num & 1) && tot <= 0) flag = false;        if (!flag) puts("No");        else puts("Yes");    }}
                          ^
0_0_20613024_29510.cpp: In function 'int main()':
0_0_20613024_29510.cpp:5:185: error: 'st' was not declared in this scope
     using namespace std;#define N 50005#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define ls rt<<1#define rs rt<<1|1char st[50005];int the[30];int main() {    while (~scanf("%s", st)) {        memset(the, 0, sizeof(the));        int len = strlen(st);        bool flag = true;        int tot = 0;        for (int i = 0; i < len; ) {            char ch = st[i];            int k = i;            while (k < len && ch == st[k]) k++;            k = k - i;            if (k == 1 || k == 2) tot++;            else {                int t = 1, x = k;                while (x >= 2 * t) {                    x -= t;                    tot++; t++;                }                tot++;            }            i += k;            the[ch - 'A'] += k;        }        int num = tot;        if (st[0] == st[len - 1] && the[st[0] - 'A'] == 2) flag = false;        int lim = 2 * tot - 1; tot--;        if ((num & 1) && tot <= 0) flag = false;        if (!flag) puts("No");        else puts("Yes");    }}
                                                                                                                                                                                         ^


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 21:00:59, Gzip enabled