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; }
^
|