Borderou de evaluare (job #1751208)
Utilizator | Data | 31 august 2016 22:22:25 | |
---|---|---|---|
Problema | Abc2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int exists(int)’:
user.cpp:16:37: error: reference to ‘hash’ is ambiguous
for(vector<int>:: iterator it = hash[key].begin(); it != hash[key].end(); it++)
^
user.cpp:9:14: note: candidates are: std::vector<int> hash [1000]
vector <int> hash[1000];
^
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:16:62: error: reference to ‘hash’ is ambiguous
for(vector<int>:: iterator it = hash[key].begin(); it != hash[key].end(); it++)
^
user.cpp:9:14: note: candidates are: std::vector<int> hash [1000]
vector <int> hash[1000];
^
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 ‘int main()’:
user.cpp:40:13: error: reference to ‘hash’ is ambiguous
hash[hash_value % MOD].push_back(hash_value);
^
user.cpp:9:14: note: candidates are: std::vector<int> hash [1000]
vector <int> hash[1000];
^
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:26:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("abc2.in", "r", stdin);
^
user.cpp:27:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("abc2.out", "w", stdout);
^
user.cpp:31:29: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fgets(text, Nmax, stdin);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !