Borderou de evaluare (job #1380995)

Utilizator stefanzzzStefan Popa stefanzzz Data 8 martie 2015 11:19:36
Problema Compunere Status done
Runda Algoritmiada 2015 - Runda 2, Seniori Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:63:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i = 0; i < v.size(); i++){ ^ user.cpp:79:3: error: reference to ‘next’ is ambiguous next[i] = ans; ^ user.cpp:10:29: note: candidates are: int next [200005] int poza[MAXN], pozb[MAXN], next[MAXN], lq, rq, pozq, ans, x; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:66:0, from /usr/include/c++/4.8/bits/stl_tree.h:61, from /usr/include/c++/4.8/map:60, from user.cpp:2: /usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:184:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) next(_ForwardIterator __x, typename ^ user.cpp:92:10: error: reference to ‘next’ is ambiguous best = next[best]; ^ user.cpp:10:29: note: candidates are: int next [200005] int poza[MAXN], pozb[MAXN], next[MAXN], lq, rq, pozq, ans, x; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:66:0, from /usr/include/c++/4.8/bits/stl_tree.h:61, from /usr/include/c++/4.8/map:60, from user.cpp:2: /usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:184:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) next(_ForwardIterator __x, typename ^ user.cpp:97:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i = 0, i1 = 1, i2 = 1; i < sc.size(); i++){ ^ user.cpp:43:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("compunere.in", "r", stdin); ^ user.cpp:44:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("compunere.out", "w", stdout); ^ user.cpp:48: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:50:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &a[i]); ^ user.cpp:55:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &b[i]); ^

Ceva nu functioneaza?