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_20613446_3395.cpp:21:17: error: '#' is not followed by a macro parameter
     #define M0(x) memset(x, 0, sizeof(x))#define clr(x,y) memset(x, y, sizeof(x))#define P 10567201#define N 1010using namespace std;long long c[1010][1010], two[1010];int n, m, v;long long f[N+5], inv[N+5];  using namespace std; void get_inv(){    inv[1] = 1;    for (int i = 2; i < N; ++i)        inv[i] = (P - P / i) * inv[P % i] % P;} void pre_do(){     get_inv();     two[0] = 1;     for (int i = 1; i < N; ++i){         two[i] = (two[i-1] << 1);         if (two[i] >
                 ^
0_0_20613446_3395.cpp:22:5: error: expected unqualified-id before '=' token
     = P) two[i] -= P;    }    for (int i = 1; i < N; ++i){         c[i][0] = 1;         for (int j = 1; j < N; ++j)             c[i][j] = c[i][j-1] * (two[i]-j+1) % P * inv[j] % P;        }} void solve(){     if (v == 0) f[0] = 1;     else f[0] = 0;     f[1] = 1;     for (int i = 2; i <= m; ++i){        long long same = f[i-2] * (two[n]-i+2) % P;        f[i] = (c[n][i-1] - same) * inv[i] % P;     }     f[m] += (f[m] < 0 ? P : 0);      printf("%I64d\n", f[m]);} int main(){    pre_do();    while (scanf("%d%d%d", &n, &m, &v) != EOF){         if (!(n+m+v)) break;         solve();    }    return 0;}
     ^
0_0_20613446_3395.cpp:22:26: error: expected declaration before '}' token
     = P) two[i] -= P;    }    for (int i = 1; i < N; ++i){         c[i][0] = 1;         for (int j = 1; j < N; ++j)             c[i][j] = c[i][j-1] * (two[i]-j+1) % P * inv[j] % P;        }} void solve(){     if (v == 0) f[0] = 1;     else f[0] = 0;     f[1] = 1;     for (int i = 2; i <= m; ++i){        long long same = f[i-2] * (two[n]-i+2) % P;        f[i] = (c[n][i-1] - same) * inv[i] % P;     }     f[m] += (f[m] < 0 ? P : 0);      printf("%I64d\n", f[m]);} int main(){    pre_do();    while (scanf("%d%d%d", &n, &m, &v) != EOF){         if (!(n+m+v)) break;         solve();    }    return 0;}
                          ^


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-12-23 10:18:34, Gzip enabled