QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#580457 | #9375. Tourist | 3un_larryfunc | Compile Error | / | / | C++23 | 302b | 2024-09-21 21:58:13 | 2024-09-21 21:58:15 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘int main()’: answer.code:2:165: error: no match for ‘operator>’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’}) 2 | using namespace std;using o=long long;int main(){ios::sync_with_stdio(false);cin.tie(nullptr);int n;cin>>n;o ans=1500;vector<int>a(n);for (int i = 0;i < n;i ++){cin> a[i];}for (int i = 0;i < n;i ++){ans+=a[i];if (ans>=4000){cout<<i+1<<"\n";return 0;}}cout<<-1<<"\n";return 0;} In file included from /usr/include/c++/13/regex:68, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:181, from answer.code:1: /usr/include/c++/13/bits/regex.h:1288:5: note: candidate: ‘template<class _Bi_iter, class _Ch_traits, class _Alloc> auto std::__cxx11::operator<=>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)’ (reversed) 1288 | operator<=>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/regex.h:1288:5: note: template argument deduction/substitution failed: answer.code:2:170: note: mismatched types ‘const std::__cxx11::sub_match<_BiIter>’ and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} 2 | using namespace std;using o=long long;int main(){ios::sync_with_stdio(false);cin.tie(nullptr);int n;cin>>n;o ans=1500;vector<int>a(n);for (int i = 0;i < n;i ++){cin> a[i];}for (int i = 0;i < n;i ++){ans+=a[i];if (ans>=4000){cout<<i+1<<"\n";return 0;}}cout<<-1<<"\n";return 0;} | ^ /usr/include/c++/13/bits/regex.h:1456:5: note: candidate: ‘template<class _Bi_iter> auto std::__cxx11::operator<=>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)’ (reversed) 1456 | operator<=>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/regex.h:1456:5: note: template argument deduction/substitution failed: answer.code:2:170: note: mismatched types ‘const std::__cxx11::sub_match<_BiIter>’ and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} 2 | using namespace std;using o=long long;int main(){ios::sync_with_stdio(false);cin.tie(nullptr);int n;cin>>n;o ans=1500;vector<int>a(n);for (int i = 0;i < n;i ++){cin> a[i];}for (int i = 0;i < n;i ++){ans+=a[i];if (ans>=4000){cout<<i+1<<"\n";return 0;}}cout<<-1<<"\n";return 0;} | ^ /usr/include/c++/13/bits/regex.h:1629:5: note: candidate: ‘template<class _Bi_iter> auto std::__cxx11::operator<=>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)’ (reversed) 1629 | operator<=>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/regex.h:1629:5: note: template argument deduction/substitution failed: answer.code:2:170: note: mismatched types ‘const std::__cxx11::sub_match<_BiIter>’ and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} 2 | using namespace std;using o=long long;int main(){ios::sync_with_stdio(false);cin.tie(nullptr);int n;cin>>n;o ans=1500;vector<int>a(n);for (int i = 0;i < n;i ++){cin> a[i];}for (int i = 0;i < n;i ++){ans+=a[i];if (ans>=4000){cout<<i+1<<"\n";return 0;}}cout<<-1<<"\n";return 0;} | ^ In file included from /usr/include/c++/13/bits/stl_algobase.h:67, from /usr/include/c++/13/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51: /usr/include/c++/13/bits/stl_iterator.h:583:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> requires three_way_comparable_with<_IteratorR, _IteratorL, std::partial_ordering> constexpr std::compare_three_way_result_t<_IteratorL, _IteratorR> std::operator<=>(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)’ (reversed) 583 | operator<=>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:583:5: note: template argument deduction/substitution failed: answer.code:2:170: note: mismatched types ‘const std::reverse_iterator<_IteratorL>’ and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} 2 | using namespace std;using o=long long;int main(){ios::sync_with_stdio(false);cin.tie(nullptr);int n;cin>>n;o ans=1500;vector<int>a(n);for (int i = 0;i < n;i ++){cin> a[i];}for (int i = 0;i < n;i ++){ans+=a[i];if (ans>=4000){cout<<i+1<<"\n";return 0;}}cout<<-1<<"\n";return 0;} | ...