Borderou de evaluare (job #1518939)
Utilizator | Data | 6 noiembrie 2015 16:20:17 | |
---|---|---|---|
Problema | Range minimum query | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:6:16: error: ‘int log2 [100001]’ redeclared as different kind of symbol
int log2[100001], dp[100001][17];
^
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:15:11: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
log2[1] = 0;
^
user.cpp:18:15: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
log2[i] = log2[aux] + 1;
^
user.cpp:18:27: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
log2[i] = log2[aux] + 1;
^
user.cpp:28:57: warning: suggest parentheses around ‘-’ inside ‘<<’ [-Wparentheses]
dp[i][j] = min(dp[i][j - 1], dp[i + (1 << j - 1)][j - 1]);
^
user.cpp:36:27: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
z = log2[y - x + 1];
^
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.in", "r", stdin);
^
user.cpp:10:36: 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:13: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:23:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &dp[i][0]);
^
user.cpp:35: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?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !