Borderou de evaluare (job #1411647)

Utilizator 4ONI2015oni2015 4ONI2015 Data 31 martie 2015 21:00:22
Problema Lowest Common Ancestor Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:7:20: error: size of array ‘rmq’ is too large int rmq[25][1 << 25], niv[N], apar[N], cnt, n, m, i, x, y, a[N], j, nn, lv; ^ user.cpp: In function ‘void df(int, int)’: user.cpp:13:5: error: ‘rmq’ was not declared in this scope rmq[0][++cnt] = nod; ^ user.cpp: In function ‘int main()’: user.cpp:39:13: error: ‘rmq’ was not declared in this scope rmq[i][j] = niv[rmq[i - 1][j]] < niv[rmq[i - 1][j + (1 << (i - 1))]] ? rmq[i - 1][j] : rmq[i - 1][j + (1 << (i - 1))]; ^ user.cpp:48:13: error: ‘rmq’ was not declared in this scope niv[rmq[lv][x]] < niv[rmq[lv][y - (1 << lv) + 1]] ? printf("%d\n", rmq[lv][x]) : printf("%d\n", rmq[lv][y - (1 << lv) + 1]); ^ user.cpp:23:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("lca.in", "r", stdin); ^ user.cpp:24:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("lca.out", "w", stdout); ^ user.cpp:25:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d", &n, &m); ^ user.cpp:28:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &x); ^ user.cpp:42:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d", &x, &y); ^

Ceva nu functioneaza?