Borderou de evaluare (job #3142744)
Utilizator | Data | 24 iulie 2023 10:02:45 | |
---|---|---|---|
Problema | Sword Art Online | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:19:29: error: type/value mismatch at argument 2 in template parameter list for 'template<class _Tp, class _Sequence, class _Compare> class std::priority_queue'
19 | priority_queue<myStruct, cmp> Q;
| ^
main.cpp:19:29: note: expected a type, got 'cmp'
main.cpp:19:29: error: template argument 3 is invalid
main.cpp: In function 'int main()':
main.cpp:35:15: error: request for member 'push' in 'Q', which is of non-class type 'int'
35 | Q.push(x);
| ^~~~
main.cpp:36:38: error: request for member 'empty' in 'Q', which is of non-class type 'int'
36 | while(hp <= 0 && k && !Q.empty()) {
| ^~~~~
main.cpp:37:25: error: request for member 'top' in 'Q', which is of non-class type 'int'
37 | hp += Q.top();
| ^~~
main.cpp:39:19: error: request for member 'pop' in 'Q', which is of non-class type 'int'
39 | Q.pop();
| ^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !