Borderou de evaluare (job #3170834)

Utilizator FlaviuuuFlaviu Flaviuuu Data 18 noiembrie 2023 10:36:42
Problema Granita Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:12:15: error: no match for 'operator[]' (operand types are 'std::pair<long long int, long long int>' and 'int') 12 | fin>>a[i].first>>a[i].second; | ^ main.cpp:12:27: error: no match for 'operator[]' (operand types are 'std::pair<long long int, long long int>' and 'int') 12 | fin>>a[i].first>>a[i].second; | ^ main.cpp:14:12: error: no match for 'operator+' (operand types are 'std::pair<long long int, long long int>' and 'int') 14 | sort(a + 1, a + n + 1); | ~ ^ ~ | | | | | int | std::pair<long long int, long long int> In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:67, from /usr/include/c++/12.2.1/bits/specfun.h:45, from /usr/include/c++/12.2.1/cmath:1935, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:41, from main.cpp:1: /usr/include/c++/12.2.1/bits/stl_iterator.h:630:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_IteratorL> std::operator+(typename reverse_iterator<_IteratorL>::difference_type, const reverse_iterator<_IteratorL>&)' 630 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_iterator.h:630:5: note: template argument deduction/substitution failed: main.cpp:14:14: note: mismatched types 'const std::reverse_iterator<_IteratorL>' and 'int' 14 | sort(a + 1, a + n + 1); | ^ /usr/include/c++/12.2.1/bits/stl_iterator.h:1786:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)' 1786 | operator+(typename move_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_iterator.h:1786:5: note: template argument deduction/substitution failed: main.cpp:14:14: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 14 | sort(a + 1, a + n + 1); | ^ In file included from /usr/include/c++/12.2.1/string:53, from /usr/include/c++/12.2.1/bits/locale_classes.h:40, from /usr/include/c++/12.2.1/bits/ios_base.h:41, from /usr/include/c++/12.2.1/ios:42, from /usr/include/c++/12.2.1/istream:38, from /usr/include/c++/12.2.1/sstream:38, from /usr/include/c++/12.2.1/complex:45, from /usr/include/c++/12.2.1/ccomplex:39, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:54: /usr/include/c++/12.2.1/bits/basic_string.h:3432:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3432 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/12.2.1/bits/basic_string.h:3432:5: note: template argument deduction/substitution failed: main.cpp:14:14: note: 'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 14 | sort(a + 1, a + n + 1); | ^ In file included from /usr/include/c++/12.2.1/string:54: /usr/include/c++/12.2.1/bits/basic_string.tcc:606:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' Non zero exit status: 1

Ceva nu functioneaza?