0_0_20613416_12715.cpp:5:5: error: expected unqualified-id before '>=' token
>=1; } return ret;}int main(){ scanf("%d",&t); for(int ca = 1; ca <= t; ca ++){ scanf("%d%d",&n,&m); init(); for(int i = 1; i <= n;i ++){ scanf("%d",a + i); if(a[i] < 0) odd_num++; } sort(a + 1, a + 1 + n); if(odd_num & 1){ int j = 1; while(a[j] < 0) j ++; indx = -- j; if(a[j] + m > 0) m += a[j], a[j] = 0; else a[j] += m,m = 0; } if(m > 0){ for(int j = indx; j <= n && m > 0; j ++) if(a[j] == 0) a[j] ++, m --; for(int j = indx; j <= n && m > 0; j ++) if(a[j] == 1) a[j] ++, m --; for(int j = indx; j <= n && m > 0; j ++) if(a[j] == 2) a[j] ++, m --; for(int j = 1; j <= n; j ++) ans = (ans * a[j]) % mod; if(m <= 0){ printf("Case %d: %I64d\n",ca,ans); }else{ if(m == 1){ for(int j = 1; j <= n; j ++) if(Min > a[j]) Min = a[j], Minpos = j; ans /= a[Minpos]; ans = (ans * (a[Minpos] + 1)) % mod; printf("Case %d: %I64d\n",ca,ans); }else if(m % 3 == 0){ ans = (ans * pow_mod(3,m/3,mod)) % mod; printf("Case %d: %I64d\n",ca,ans); }else if((m - 1) % 3 == 0){ ans = (ans * pow_mod(3,(m - 1)/3 - 1,mod)) % mod; ans = (ans * 4) % mod; printf("Case %d: %I64d\n",ca,ans); }else if((m - 2) % 3 == 0){ ans = (ans * pow_mod(3,(m - 2)/3,mod)) % mod; ans = (ans * 2) % mod; printf("Case %d: %I64d\n",ca,ans); } } } else{ for(int j = 1; j <= n; j ++) ans = (ans * a[j]) % mod; printf("Case %d: %I64d\n",ca,ans); } } return 0;}
^
0_0_20613416_12715.cpp:5:13: error: expected declaration before '}' token
>=1; } return ret;}int main(){ scanf("%d",&t); for(int ca = 1; ca <= t; ca ++){ scanf("%d%d",&n,&m); init(); for(int i = 1; i <= n;i ++){ scanf("%d",a + i); if(a[i] < 0) odd_num++; } sort(a + 1, a + 1 + n); if(odd_num & 1){ int j = 1; while(a[j] < 0) j ++; indx = -- j; if(a[j] + m > 0) m += a[j], a[j] = 0; else a[j] += m,m = 0; } if(m > 0){ for(int j = indx; j <= n && m > 0; j ++) if(a[j] == 0) a[j] ++, m --; for(int j = indx; j <= n && m > 0; j ++) if(a[j] == 1) a[j] ++, m --; for(int j = indx; j <= n && m > 0; j ++) if(a[j] == 2) a[j] ++, m --; for(int j = 1; j <= n; j ++) ans = (ans * a[j]) % mod; if(m <= 0){ printf("Case %d: %I64d\n",ca,ans); }else{ if(m == 1){ for(int j = 1; j <= n; j ++) if(Min > a[j]) Min = a[j], Minpos = j; ans /= a[Minpos]; ans = (ans * (a[Minpos] + 1)) % mod; printf("Case %d: %I64d\n",ca,ans); }else if(m % 3 == 0){ ans = (ans * pow_mod(3,m/3,mod)) % mod; printf("Case %d: %I64d\n",ca,ans); }else if((m - 1) % 3 == 0){ ans = (ans * pow_mod(3,(m - 1)/3 - 1,mod)) % mod; ans = (ans * 4) % mod; printf("Case %d: %I64d\n",ca,ans); }else if((m - 2) % 3 == 0){ ans = (ans * pow_mod(3,(m - 2)/3,mod)) % mod; ans = (ans * 2) % mod; printf("Case %d: %I64d\n",ca,ans); } } } else{ for(int j = 1; j <= n; j ++) ans = (ans * a[j]) % mod; printf("Case %d: %I64d\n",ca,ans); } } return 0;}
^
|