Borderou de evaluare (job #727518)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Brățara (clasele 5/6) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 28 iul. 2023 14:22:40 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int find_bracelets_count(const std::vector<int>&)':
main.cpp:17:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'unsigned int'} [-Wsign-compare]
17 | for (int i = 0; i < numbers.size() - 1; i++) {
| ~~^~~~~~~~~~~~~~~~~~~~
main.cpp: At global scope:
main.cpp:25:76: error: return type 'class std::tuple<int, int, int>' is incomplete
25 | tuple<int, int, int> find_longest_lucky_bracelet(const vector<int>& numbers) {
| ^
main.cpp: In function 'void find_longest_lucky_bracelet(const std::vector<int>&)':
main.cpp:33:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'unsigned int'} [-Wsign-compare]
33 | for (int i = 0; i < numbers.size() - 1; i++) {
| ~~^~~~~~~~~~~~~~~~~~~~
main.cpp:50:16: error: 'make_tuple' was not declared in this scope
50 | return make_tuple(-1, -1, -1);
| ^~~~~~~~~~
main.cpp:4:1: note: 'std::make_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
3 | #include <vector>
+++ |+#include <tuple>
4 |
main.cpp:52:16: error: 'make_tuple' was not declared in this scope
52 | return make_tuple(max_length, start_index, end_index);
| ^~~~~~~~~~
main.cpp:52:16: note: 'std::make_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
main.cpp: In function 'int main()':
main.cpp:72:14: error: 'void result' has incomplete type
72 | auto result = find_longest_lucky_bracelet(numbers);
| ^~~~~~