Borderou de evaluare (job #383305)

Utilizator eudanipEugenie Daniel Posdarascu eudanip Data 16 ianuarie 2010 11:58:52
Problema Secventa 5 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int find(unsigned int)’: user.cpp:16:22: error: reference to ‘hash’ is ambiguous int key=x%MOD,sz=hash[key].size(),i; ^ user.cpp:12:34: note: candidates are: std::vector<std::pair<unsigned int, int> > hash [666013] vector< pair<unsigned int,int> > hash[MOD]; ^ In file included from /usr/include/c++/4.8/bits/stl_bvector.h:1134:0, from /usr/include/c++/4.8/vector:65, from user.cpp:3: /usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^ user.cpp:17:10: error: ‘i’ was not declared in this scope for (i=0;i<sz;i++) ^ user.cpp:18:13: error: reference to ‘hash’ is ambiguous if (hash[key][i].first==x) ^ user.cpp:12:34: note: candidates are: std::vector<std::pair<unsigned int, int> > hash [666013] vector< pair<unsigned int,int> > hash[MOD]; ^ In file included from /usr/include/c++/4.8/bits/stl_bvector.h:1134:0, from /usr/include/c++/4.8/vector:65, from user.cpp:3: /usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^ user.cpp:19:20: error: reference to ‘hash’ is ambiguous return hash[key][i].second; ^ user.cpp:12:34: note: candidates are: std::vector<std::pair<unsigned int, int> > hash [666013] vector< pair<unsigned int,int> > hash[MOD]; ^ In file included from /usr/include/c++/4.8/bits/stl_bvector.h:1134:0, from /usr/include/c++/4.8/vector:65, from user.cpp:3: /usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^ user.cpp: In function ‘void add(unsigned int, int)’: user.cpp:28:9: error: reference to ‘hash’ is ambiguous hash[x%MOD].push_back(make_pair(x,indx)); ^ user.cpp:12:34: note: candidates are: std::vector<std::pair<unsigned int, int> > hash [666013] vector< pair<unsigned int,int> > hash[MOD]; ^ In file included from /usr/include/c++/4.8/bits/stl_bvector.h:1134:0, from /usr/include/c++/4.8/vector:65, from user.cpp:3:
Test Timp executie Memorie folosita Mesaj Punctaj/test
128ms8016kbOK10
224ms8040kbOK10
336ms8164kbOK10
496ms8812kbOK10
5120ms8596kbOK10
6312ms11188kbOK10
7736ms12940kbOK10
8856ms13032kbOK10
91448ms19600kbOK10
101352ms26012kbOK10
Punctaj total0

Ceva nu functioneaza?