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_27955314_13851.cpp:55:349: error: stray '#' in program
         b[i] = (str[i] == '(' && match[i])?(b[i] = b[match[i] + 1] + 1):0;    for(int i = 1; i <= n; i++)         ans[i] = (str[i] == '(')?(ans[pre[i]] + ((long long)b[i]*a[match[i]] % Mod) % Mod):ans[match[i]];  }long long calcu(){    long long tot = 0;    for(int i = 1; i <= n; i++)        tot = tot + ans[i]*i % Mod;    return tot; }int main(){#ifndef ONLINE_JUDGE    //freopen("5357.in","r",stdin);    //freopen("5357.out","w",stdout);#endif    read(T);    while(T--)    {        scanf("%s", str + 1);        n = strlen(str + 1);        prework(), solve();        write(calcu()), puts("");    }#ifndef ONLINE_JUDGE    //fclose(stdin);    //fclose(stdout);#endif    return 0;            }
                                                                                                                                                                                                                                                                                                                                                             ^
0_0_27955314_13851.cpp: In function 'int main()':
0_0_27955314_13851.cpp:55:350: error: 'ifndef' was not declared in this scope
         b[i] = (str[i] == '(' && match[i])?(b[i] = b[match[i] + 1] + 1):0;    for(int i = 1; i <= n; i++)         ans[i] = (str[i] == '(')?(ans[pre[i]] + ((long long)b[i]*a[match[i]] % Mod) % Mod):ans[match[i]];  }long long calcu(){    long long tot = 0;    for(int i = 1; i <= n; i++)        tot = tot + ans[i]*i % Mod;    return tot; }int main(){#ifndef ONLINE_JUDGE    //freopen("5357.in","r",stdin);    //freopen("5357.out","w",stdout);#endif    read(T);    while(T--)    {        scanf("%s", str + 1);        n = strlen(str + 1);        prework(), solve();        write(calcu()), puts("");    }#ifndef ONLINE_JUDGE    //fclose(stdin);    //fclose(stdout);#endif    return 0;            }
                                                                                                                                                                                                                                                                                                                                                              ^
<command-line>:0:14: error: expected '}' at end of input
0_0_27955314_13851.cpp:55:357: note: in expansion of macro 'ONLINE_JUDGE'
         b[i] = (str[i] == '(' && match[i])?(b[i] = b[match[i] + 1] + 1):0;    for(int i = 1; i <= n; i++)         ans[i] = (str[i] == '(')?(ans[pre[i]] + ((long long)b[i]*a[match[i]] % Mod) % Mod):ans[match[i]];  }long long calcu(){    long long tot = 0;    for(int i = 1; i <= n; i++)        tot = tot + ans[i]*i % Mod;    return tot; }int main(){#ifndef ONLINE_JUDGE    //freopen("5357.in","r",stdin);    //freopen("5357.out","w",stdout);#endif    read(T);    while(T--)    {        scanf("%s", str + 1);        n = strlen(str + 1);        prework(), solve();        write(calcu()), puts("");    }#ifndef ONLINE_JUDGE    //fclose(stdin);    //fclose(stdout);#endif    return 0;            }
                                                                                                                                                                                                                                                                                                                                                                     ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-01-10 17:29:59, Gzip enabled