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_20614697_23011.cpp:4:25: error: stray '#' in program
     using namespace std;#define LL long long#define N 50007LL c[N], s[N];void init() {    for (LL i = 1; i < N; ++i)        c[i] = i * (i - 1) >> 1;}inline int read() {    int ret = 0;    char ch = getchar();    while (!('0' <= ch && ch <= '9'))        ch = getchar();    while ('0' <= ch && ch <= '9') {        ret = ret * 10 + ch - '0';        ch = getchar();    }    return ret;}int main() {    init();    int T = read();    int n, i;    LL sum;    bool flag;    while (T--) {        n = read();        for (i = 0; i < n; ++i)            s[i] = read();        sort(s, s + n);        sum = 0;        flag = true;        for (i = 1; i <= n; ++i) {            sum = sum + s[i - 1];            if (sum < c[i]) {                flag = false;                break;            }        }        if (sum != c[n])            flag = false;        if (flag)            puts("It seems to have no problem.");        else            puts("The data have been tampered with!");    }    return 0;}
                         ^
0_0_20614697_23011.cpp:4:45: error: stray '#' in program
     using namespace std;#define LL long long#define N 50007LL c[N], s[N];void init() {    for (LL i = 1; i < N; ++i)        c[i] = i * (i - 1) >> 1;}inline int read() {    int ret = 0;    char ch = getchar();    while (!('0' <= ch && ch <= '9'))        ch = getchar();    while ('0' <= ch && ch <= '9') {        ret = ret * 10 + ch - '0';        ch = getchar();    }    return ret;}int main() {    init();    int T = read();    int n, i;    LL sum;    bool flag;    while (T--) {        n = read();        for (i = 0; i < n; ++i)            s[i] = read();        sort(s, s + n);        sum = 0;        flag = true;        for (i = 1; i <= n; ++i) {            sum = sum + s[i - 1];            if (sum < c[i]) {                flag = false;                break;            }        }        if (sum != c[n])            flag = false;        if (flag)            puts("It seems to have no problem.");        else            puts("The data have been tampered with!");    }    return 0;}
                                             ^
0_0_20614697_23011.cpp:4:26: error: 'define' does not name a type
     using namespace std;#define LL long long#define N 50007LL c[N], s[N];void init() {    for (LL i = 1; i < N; ++i)        c[i] = i * (i - 1) >> 1;}inline int read() {    int ret = 0;    char ch = getchar();    while (!('0' <= ch && ch <= '9'))        ch = getchar();    while ('0' <= ch && ch <= '9') {        ret = ret * 10 + ch - '0';        ch = getchar();    }    return ret;}int main() {    init();    int T = read();    int n, i;    LL sum;    bool flag;    while (T--) {        n = read();        for (i = 0; i < n; ++i)            s[i] = read();        sort(s, s + n);        sum = 0;        flag = true;        for (i = 1; i <= n; ++i) {            sum = sum + s[i - 1];            if (sum < c[i]) {                flag = false;                break;            }        }        if (sum != c[n])            flag = false;        if (flag)            puts("It seems to have no problem.");        else            puts("The data have been tampered with!");    }    return 0;}
                          ^
0_0_20614697_23011.cpp: In function 'void init()':
0_0_20614697_23011.cpp:4:96: error: 'LL' was not declared in this scope
     using namespace std;#define LL long long#define N 50007LL c[N], s[N];void init() {    for (LL i = 1; i < N; ++i)        c[i] = i * (i - 1) >> 1;}inline int read() {    int ret = 0;    char ch = getchar();    while (!('0' <= ch && ch <= '9'))        ch = getchar();    while ('0' <= ch && ch <= '9') {        ret = ret * 10 + ch - '0';        ch = getchar();    }    return ret;}int main() {    init();    int T = read();    int n, i;    LL sum;    bool flag;    while (T--) {        n = read();        for (i = 0; i < n; ++i)            s[i] = read();        sort(s, s + n);        sum = 0;        flag = true;        for (i = 1; i <= n; ++i) {            sum = sum + s[i - 1];            if (sum < c[i]) {                flag = false;                break;            }        }        if (sum != c[n])            flag = false;        if (flag)            puts("It seems to have no problem.");        else            puts("The data have been tampered with!");    }    return 0;}
                                                                                                ^
0_0_20614697_23011.cpp:4:106: error: 'i' was not declared in this scope
     using namespace std;#define LL long long#define N 50007LL c[N], s[N];void init() {    for (LL i = 1; i < N; ++i)        c[i] = i * (i - 1) >> 1;}inline int read() {    int ret = 0;    char ch = getchar();    while (!('0' <= ch && ch <= '9'))        ch = getchar();    while ('0' <= ch && ch <= '9') {        ret = ret * 10 + ch - '0';        ch = getchar();    }    return ret;}int main() {    init();    int T = read();    int n, i;    LL sum;    bool flag;    while (T--) {        n = read();        for (i = 0; i < n; ++i)            s[i] = read();        sort(s, s + n);        sum = 0;        flag = true;        for (i = 1; i <= n; ++i) {            sum = sum + s[i - 1];            if (sum < c[i]) {                flag = false;                break;            }        }        if (sum != c[n])            flag = false;        if (flag)            puts("It seems to have no problem.");        else            puts("The data have been tampered with!");    }    return 0;}
                                                                                                          ^
0_0_20614697_23011.cpp:4:110: error: 'N' was not declared in this scope
     using namespace std;#define LL long long#define N 50007LL c[N], s[N];void init() {    for (LL i = 1; i < N; ++i)        c[i] = i * (i - 1) >> 1;}inline int read() {    int ret = 0;    char ch = getchar();    while (!('0' <= ch && ch <= '9'))        ch = getchar();    while ('0' <= ch && ch <= '9') {        ret = ret * 10 + ch - '0';        ch = getchar();    }    return ret;}int main() {    init();    int T = read();    int n, i;    LL sum;    bool flag;    while (T--) {        n = read();        for (i = 0; i < n; ++i)            s[i] = read();        sort(s, s + n);        sum = 0;        flag = true;        for (i = 1; i <= n; ++i) {            sum = sum + s[i - 1];            if (sum < c[i]) {                flag = false;                break;            }        }        if (sum != c[n])            flag = false;        if (flag)            puts("It seems to have no problem.");        else            puts("The data have been tampered with!");    }    return 0;}
                                                                                                              ^
0_0_20614697_23011.cpp:4:125: error: 'c' was not declared in this scope
     using namespace std;#define LL long long#define N 50007LL c[N], s[N];void init() {    for (LL i = 1; i < N; ++i)        c[i] = i * (i - 1) >> 1;}inline int read() {    int ret = 0;    char ch = getchar();    while (!('0' <= ch && ch <= '9'))        ch = getchar();    while ('0' <= ch && ch <= '9') {        ret = ret * 10 + ch - '0';        ch = getchar();    }    return ret;}int main() {    init();    int T = read();    int n, i;    LL sum;    bool flag;    while (T--) {        n = read();        for (i = 0; i < n; ++i)            s[i] = read();        sort(s, s + n);        sum = 0;        flag = true;        for (i = 1; i <= n; ++i) {            sum = sum + s[i - 1];            if (sum < c[i]) {                flag = false;                break;            }        }        if (sum != c[n])            flag = false;        if (flag)            puts("It seems to have no problem.");        else            puts("The data have been tampered with!");    }    return 0;}
                                                                                                                             ^
0_0_20614697_23011.cpp: In function 'int main()':
0_0_20614697_23011.cpp:4:442: error: 'LL' was not declared in this scope
     using namespace std;#define LL long long#define N 50007LL c[N], s[N];void init() {    for (LL i = 1; i < N; ++i)        c[i] = i * (i - 1) >> 1;}inline int read() {    int ret = 0;    char ch = getchar();    while (!('0' <= ch && ch <= '9'))        ch = getchar();    while ('0' <= ch && ch <= '9') {        ret = ret * 10 + ch - '0';        ch = getchar();    }    return ret;}int main() {    init();    int T = read();    int n, i;    LL sum;    bool flag;    while (T--) {        n = read();        for (i = 0; i < n; ++i)            s[i] = read();        sort(s, s + n);        sum = 0;        flag = true;        for (i = 1; i <= n; ++i) {            sum = sum + s[i - 1];            if (sum < c[i]) {                flag = false;                break;            }        }        if (sum != c[n])            flag = false;        if (flag)            puts("It seems to have no problem.");        else            puts("The data have been tampered with!");    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                          ^
0_0_20614697_23011.cpp:4:542: error: 's' was not declared in this scope
     using namespace std;#define LL long long#define N 50007LL c[N], s[N];void init() {    for (LL i = 1; i < N; ++i)        c[i] = i * (i - 1) >> 1;}inline int read() {    int ret = 0;    char ch = getchar();    while (!('0' <= ch && ch <= '9'))        ch = getchar();    while ('0' <= ch && ch <= '9') {        ret = ret * 10 + ch - '0';        ch = getchar();    }    return ret;}int main() {    init();    int T = read();    int n, i;    LL sum;    bool flag;    while (T--) {        n = read();        for (i = 0; i < n; ++i)          


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-05-18 19:30:40, Gzip enabled