Borderou de evaluare (job #806305)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Labtof (clasele 9-10) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 24 ian. 2025 20:28:29 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:12:15: error: 'uint8_t' was not declared in this scope
12 | unordered_map<uint8_t, short> e;
| ^~~~~~~
main.cpp:4:1: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
3 | #include <algorithm>
+++ |+#include <cstdint>
4 |
main.cpp:12:29: error: template argument 1 is invalid
12 | unordered_map<uint8_t, short> e;
| ^
main.cpp:12:29: error: template argument 3 is invalid
main.cpp:12:29: error: template argument 4 is invalid
main.cpp:12:29: error: template argument 5 is invalid
main.cpp:15:5: error: 'uint8_t' does not name a type
15 | uint8_t cod;
| ^~~~~~~
main.cpp:15:5: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
main.cpp:19:1: error: 'uint8_t' does not name a type
19 | uint8_t get_code() {
| ^~~~~~~
main.cpp:19:1: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
main.cpp: In function 'int main()':
main.cpp:38:9: error: 'uint8_t' was not declared in this scope
38 | uint8_t cod_pozitie = get_code();
| ^~~~~~~
main.cpp:38:9: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
main.cpp:41:11: error: 'cod_pozitie' was not declared in this scope
41 | e[cod_pozitie]=necesar_pozitie;
| ^~~~~~~~~~~
main.cpp:49:29: error: 'get_code' was not declared in this scope
49 | short cod_pozitie = get_code();
| ^~~~~~~~
main.cpp:50:14: error: 'struct jucator' has no member named 'cod'
50 | v[i].cod=cod_pozitie;
| ^~~
main.cpp:56:22: error: 'struct jucator' has no member named 'cod'
56 | short c=v[i].cod;
| ^~~
main.cpp:57:14: error: invalid types 'int[short int]' for array subscript
57 | if (e[c]>0) {
| ^
main.cpp:58:14: error: invalid types 'int[short int]' for array subscript
58 | e[c]--;
| ^