|
|
вернуться в форумCompilation error When I submit the solution for the problem I get a compilation error. The error reads: "You tried to solve problem 1017. Your solution on C++ was compiled with the following errors: 143733 temp\143733(54) : error C2471: cannot update program database 'e:\judge\vc60.pdb'" can anyone tell me what is this about. I am sure the problem is correctly solved and that it does no illegal operations. Also it compiles perfectly under gcc for dos. I can't test it with Visual C++ but I don't use anything other than ANSI so it should be ok. I attach the source code of my program, maybe you could indicate the error. If the error is not with my source code, but with TIMUS, what should I do? #include <stdio.h> #define MAX 501 int n; double answer, d[MAX][MAX]; void solve() { int i, j, k; // d[i][j] = numarul de moduri in care se pot aranja j blocuri astfel // incat inaltzimea sa fie egazact j for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) d[i][j] = 0; d[0][0] = 1; for (i = 1; i <= n; i++) for (j = 1; j <= n && i - j >= 0; j++) { d[i][j] = 0; for (k = 0; k < j; k++) d[i][j] += d[i - j][k]; } /* for (i = 1; i <= n; i++) { for (j = 1; j <= n; j++) printf("%d ", d[i][j]); printf("\n"); }*/ for (k = 1; k < n; k++) answer += d[n][k]; } int main() { /*#ifndef ONLINE_JUDGE freopen("staircases.in", "r", stdin); freopen("staircases.out", "w", stdout); #endif*/ scanf("%d", &n); solve(); printf("%.0lf\n", answer); /*#ifndef ONLINE_JUDGE fclose(stdin); fclose(stdout); #endif*/ return 0; } Re: Compilation error I think the problem is not with my program but with the TIMUS computer. How can it be solved. The reason I say the problem is with their computer is that even when I submit a wrong simple solution: #include <stdio.h> int main() { int n; scanf("%d", &n); printf("%d", n); return 0; } i get the same result. Can anyone help me with this, please? Re: Compilation error > I think the problem is not with my program but with the TIMUS > computer. How can it be solved. The reason I say the problem is with > their computer is that even when I submit a wrong simple solution: > > #include <stdio.h> > > int main() > { > int n; > scanf("%d", &n); > printf("%d", n); > return 0; > } > > i get the same result. > Can anyone help me with this, please? > in C++ it is right,but in C it will get Compilation error |
|
|