Borderou de evaluare (job #1427030)
Utilizator | Data | 1 mai 2015 13:04:51 | |
---|---|---|---|
Problema | Ismquery | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int querynth_aib(int)’:
user.cpp:40:34: error: reference to ‘less’ is ambiguous
for(i = 1, ii = 0; i <= n && less(i, x); i <<= 1, ii++);
^
user.cpp:33:13: note: candidates are: bool less(int, int)
inline bool less(int pos, int x) {
^
In file included from /usr/include/c++/4.8/string:48:0,
from /usr/include/c++/4.8/random:41,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_function.h:231:12: note: template<class _Tp> struct std::less
struct less : public binary_function<_Tp, _Tp, bool>
^
user.cpp:45:33: error: reference to ‘less’ is ambiguous
if(i + (1 << j) <= n && less(i + (1 << j), x)) {
^
user.cpp:33:13: note: candidates are: bool less(int, int)
inline bool less(int pos, int x) {
^
In file included from /usr/include/c++/4.8/string:48:0,
from /usr/include/c++/4.8/random:41,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_function.h:231:12: note: template<class _Tp> struct std::less
struct less : public binary_function<_Tp, _Tp, bool>
^
user.cpp: In function ‘int main()’:
user.cpp:57:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("ismquery.in", "r", stdin);
^
user.cpp:58:41: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("ismquery.out", "w", stdout);
^
user.cpp:62:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &nrq);
^
user.cpp:64:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &v[i]);
^
user.cpp:67:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &g, &h);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !