Borderou de evaluare (job #1764330)

Utilizator MiricaMateiMirica Matei MiricaMatei Data 25 septembrie 2016 13:56:16
Problema Range minimum query Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:6:58: error: ‘int log2 [100005]’ redeclared as different kind of symbol int rmq[NMAX + 5][LOGMAX + 5], v[NMAX + 5], log2[NMAX + 5]; ^ In file included from /usr/include/features.h:357:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420, from /usr/include/c++/4.8/cstdio:41, from user.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:146:1: error: previous declaration of ‘double log2(double)’ __MATHCALL (log2,, (_Mdouble_ __x)); ^ user.cpp: In function ‘int main()’: user.cpp:17:11: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript log2[i] = log2[i >> 1] + 1; ^ user.cpp:17:26: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript log2[i] = log2[i >> 1] + 1; ^ user.cpp:20:61: warning: suggest parentheses around ‘-’ inside ‘<<’ [-Wparentheses] rmq[i][j] = min(rmq[i - 1][j], rmq[i - 1][j + (1 << i - 1)]); ^ user.cpp:24:42: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript printf("%d\n", min(rmq[log2[y - x + 1]][x], rmq[log2[y - x + 1]][y - (1 << log2[y - x + 1]) + 1])); ^ user.cpp:24:67: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript printf("%d\n", min(rmq[log2[y - x + 1]][x], rmq[log2[y - x + 1]][y - (1 << log2[y - x + 1]) + 1])); ^ user.cpp:24:94: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript printf("%d\n", min(rmq[log2[y - x + 1]][x], rmq[log2[y - x + 1]][y - (1 << log2[y - x + 1]) + 1])); ^ user.cpp:8:32: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("rmq.in", "r", stdin); ^ user.cpp:9:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("rmq.out", "w", stdout); ^ user.cpp:11:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d", &n, &m); ^ user.cpp:13:23: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &v[i]); ^ user.cpp:23:26: 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?