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_20614667_17090.cpp:15:17: error: stray '#' in program
     (b)?(a):(b))#define mem(a,b) memset(a,b,sizeof(a))#define rep(i,a,b) for(int i=(a); i<=(b); i++)#define dec(i,a,b) for(int i=(a); i>=(b); i--) using namespace std;const int mod = 1e9 + 7;const double eps = 1e-8;const double ee = exp(1.0);const int inf = 0x3f3f3f3f;const int maxn = 500 + 10;const double pi = acos(-1.0);const LL iinf = 0x3f3f3f3f3f3f3f3f; int readT(){    char c;    int ret = 0,flg = 0;    while(c = getchar(), (c < '0' || c > '9') && c != '-');    if(c == '-') flg = 1; else ret = c ^ 48;    while( c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c ^ 48);    return flg ? - ret : ret;} int c[maxn][maxn];int a[maxn][maxn];int n, m; int lowbit(int x){    return x & -x;} void update(int x, int y, int num){    for (int i = x; i <= n; i += lowbit(i))    {        for (int j = y; j <= m; j += lowbit(j))        {            c[i][j] ^= num;        }    }} int query(int x, int y){    int res = 0;    int t = x;    for (int i = x; i > 0; i -= lowbit(i))    {        for (int j = y; j > 0; j -= lowbit(j))        {            res ^= c[i][j];        }    }    return res;} int sum(int x0, int y0, int x1, int y1){    x0--, y0--;    return query(x1, y1) ^ query(x0, y1) ^ query(x1, y0) ^ query(x0, y0);} int main(){    int ncase = readT();    while (ncase--)    {        mem(c, 0);        n = readT();        m = readT();         int q = readT();         rep(i, 1, n)        {            rep(j, 1, m)            {                a[i][j] = readT();                update(i, j, a[i][j]);            }        }         while (q--)        {            int op = readT();            if (op == 1)            {                int x1 = readT();                int y1 = readT();                int x2 = readT();                int y2 = readT();                 int ans = sum(x1, y1, x2, y2);                 puts(ans ? "Yes" : "No");            }            else            {                int x = readT();                int y = readT();                int num =readT();                update(x, y, num ^ a[x][y]);                a[x][y] = num;            }        }    }    return 0;}
                 ^
0_0_20614667_17090.cpp:15:55: error: stray '#' in program
     (b)?(a):(b))#define mem(a,b) memset(a,b,sizeof(a))#define rep(i,a,b) for(int i=(a); i<=(b); i++)#define dec(i,a,b) for(int i=(a); i>=(b); i--) using namespace std;const int mod = 1e9 + 7;const double eps = 1e-8;const double ee = exp(1.0);const int inf = 0x3f3f3f3f;const int maxn = 500 + 10;const double pi = acos(-1.0);const LL iinf = 0x3f3f3f3f3f3f3f3f; int readT(){    char c;    int ret = 0,flg = 0;    while(c = getchar(), (c < '0' || c > '9') && c != '-');    if(c == '-') flg = 1; else ret = c ^ 48;    while( c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c ^ 48);    return flg ? - ret : ret;} int c[maxn][maxn];int a[maxn][maxn];int n, m; int lowbit(int x){    return x & -x;} void update(int x, int y, int num){    for (int i = x; i <= n; i += lowbit(i))    {        for (int j = y; j <= m; j += lowbit(j))        {            c[i][j] ^= num;        }    }} int query(int x, int y){    int res = 0;    int t = x;    for (int i = x; i > 0; i -= lowbit(i))    {        for (int j = y; j > 0; j -= lowbit(j))        {            res ^= c[i][j];        }    }    return res;} int sum(int x0, int y0, int x1, int y1){    x0--, y0--;    return query(x1, y1) ^ query(x0, y1) ^ query(x1, y0) ^ query(x0, y0);} int main(){    int ncase = readT();    while (ncase--)    {        mem(c, 0);        n = readT();        m = readT();         int q = readT();         rep(i, 1, n)        {            rep(j, 1, m)            {                a[i][j] = readT();                update(i, j, a[i][j]);            }        }         while (q--)        {            int op = readT();            if (op == 1)            {                int x1 = readT();                int y1 = readT();                int x2 = readT();                int y2 = readT();                 int ans = sum(x1, y1, x2, y2);                 puts(ans ? "Yes" : "No");            }            else            {                int x = readT();                int y = readT();                int num =readT();                update(x, y, num ^ a[x][y]);                a[x][y] = num;            }        }    }    return 0;}
                                                       ^
0_0_20614667_17090.cpp:15:101: error: stray '#' in program
     (b)?(a):(b))#define mem(a,b) memset(a,b,sizeof(a))#define rep(i,a,b) for(int i=(a); i<=(b); i++)#define dec(i,a,b) for(int i=(a); i>=(b); i--) using namespace std;const int mod = 1e9 + 7;const double eps = 1e-8;const double ee = exp(1.0);const int inf = 0x3f3f3f3f;const int maxn = 500 + 10;const double pi = acos(-1.0);const LL iinf = 0x3f3f3f3f3f3f3f3f; int readT(){    char c;    int ret = 0,flg = 0;    while(c = getchar(), (c < '0' || c > '9') && c != '-');    if(c == '-') flg = 1; else ret = c ^ 48;    while( c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c ^ 48);    return flg ? - ret : ret;} int c[maxn][maxn];int a[maxn][maxn];int n, m; int lowbit(int x){    return x & -x;} void update(int x, int y, int num){    for (int i = x; i <= n; i += lowbit(i))    {        for (int j = y; j <= m; j += lowbit(j))        {            c[i][j] ^= num;        }    }} int query(int x, int y){    int res = 0;    int t = x;    for (int i = x; i > 0; i -= lowbit(i))    {        for (int j = y; j > 0; j -= lowbit(j))        {            res ^= c[i][j];        }    }    return res;} int sum(int x0, int y0, int x1, int y1){    x0--, y0--;    return query(x1, y1) ^ query(x0, y1) ^ query(x1, y0) ^ query(x0, y0);} int main(){    int ncase = readT();    while (ncase--)    {        mem(c, 0);        n = readT();        m = readT();         int q = readT();         rep(i, 1, n)        {            rep(j, 1, m)            {                a[i][j] = readT();                update(i, j, a[i][j]);            }        }         while (q--)        {            int op = readT();            if (op == 1)            {                int x1 = readT();                int y1 = readT();                int x2 = readT();                int y2 = readT();                 int ans = sum(x1, y1, x2, y2);                 puts(ans ? "Yes" : "No");            }            else            {                int x = readT();                int y = readT();                int num =readT();                update(x, y, num ^ a[x][y]);                a[x][y] = num;            }        }    }    return 0;}
                                                                                                     ^
0_0_20614667_17090.cpp:15:8: error: expected constructor, destructor, or type conversion before '?' token
     (b)?(a):(b))#define mem(a,b) memset(a,b,sizeof(a))#define rep(i,a,b) for(int i=(a); i<=(b); i++)#define dec(i,a,b) for(int i=(a); i>=(b); i--) using namespace std;const int mod = 1e9 + 7;const double eps = 1e-8;const double ee = exp(1.0);const int inf = 0x3f3f3f3f;const int maxn = 500 + 10;const double pi = acos(-1.0);const LL iinf = 0x3f3f3f3f3f3f3f3f; int readT(){    char c;    int ret = 0,flg = 0;    while(c = getchar(), (c < '0' || c > '9') && c != '-');    if(c == '-') flg = 1; else ret = c ^ 48;    while( c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c ^ 48);    return flg ? - ret : ret;} int c[maxn][maxn];int a[maxn][maxn];int n, m; int lowbit(int x){    return x & -x;} void update(int x, int y, int num){    for (int i = x; i <= n; i += lowbit(i))    {        for (int j = y; j <= m; j += lowbit(j))        {            c[i][j] ^= num;        }    }} int query(int x, int y){    int res = 0;    int t = x;    for (int i = x; i > 0; i -= lowbit(i))    {        for (int j = y; j > 0; j -= lowbit(j))        {            res ^= c[i][j];        }    }    return res;} int sum(int x0, int y0, int x1, int y1){    x0--, y0--;    return query(x1, y1) ^ query(x0, y1) ^ query(x1, y0) ^ query(x0, y0);} int main(){    int ncase = readT();    while (ncase--)    {        mem(c, 0);        n = readT();        m = readT();         int q = readT();         rep(i, 1, n)        {            rep(j, 1, m)            {                a[i][j] = readT();                update(i, j, a[i][j]);            }        }         while (q--)        {            int op = readT();            if (op == 1)            {                int x1 = readT();                int y1 = readT();                int x2 = readT();                int y2 = readT();                 int ans = sum(x1, y1, x2, y2);                 puts(ans ? "Yes" : "No");            }            else            {                int x = readT();                int y = readT();                int num =readT();                update(x, y, num ^ a[x][y]);                a[x][y] = num;            }        }    }    return 0;}
        ^
0_0_20614667_17090.cpp:15:89: error: 'i' does not name a type
     (b)?(a):(b))#define mem(a,b) memset(a,b,sizeof(a))#define rep(i,a,b) for(int i=(a); i<=(b); i++)#define dec(i,a,b) for(int i=(a); i>=(b); i--) using namespace std;const int mod = 1e9 + 7;const double eps = 1e-8;const double ee = exp(1.0);const int inf = 0x3f3f3f3f;const int maxn = 500 + 10;const double pi = acos(-1.0);const LL iinf = 0x3f3f3f3f3f3f3f3f; int readT(){    char c;    int ret = 0,flg = 0;    while(c = getchar(), (c < '0' || c > '9') && c != '-');    if(c == '-') flg = 1; else ret = c ^ 48;    while( c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c ^ 48);    return flg ? - ret : ret;} int c[maxn][maxn];int a[maxn][maxn];int n, m; int lowbit(int x){    return x & -x;} void update(int x, int y, int num){    for (int i = x; i <= n; i += lowbit(i))    {        for (int j = y; j <= m; j += lowbit(j))        {            c[i][j] ^= num;        }    }} int query(int x, int y){    int res = 0;    int t = x;    for (int i = x; i > 0; i -= lowbit(i))    {        for (int j = y; j > 0; j -= lowbit(j))        {            res ^= c[i][j];        }    }    return res;} int sum(int x0, int y0, int x1, int y1){    x0--, y0--;    return query(x1, y1) ^ query(x0, y1) ^ query(x1, y0) ^ query(x0, y0);} int main(){    int ncase = re


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 10:07:08, Gzip enabled