| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 512677 | algorithm16 | Languages (IOI10_languages) | C++14 | Compilation error | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<iostream>
#include<set>
#include<algorithm>
#include "grader.h"
#include "lang.h"
using namespace std;
typedef long long int llint;
set <llint> s[65],s1;
void excerpt(int *E) {
s1.clear();
for(int i=0;i<100;i++) {
s1.insert(E[i]);
if(i) s1.insert(E[i-1]*1e6+E[i]);
}
int mx=0,idx=0;
for(int i=0;i<56;i++) {
int cnt=0;
for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
cnt+=(s[i].find(*it)!=s[i].end());
}
if(cnt>mx) {
mx=cnt;
idx=i;
}
}
int l=language(idx);
for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
s[l].insert(*it);
}
}
Compilation message (stderr)
lang.cpp: In function 'void excerpt(int*)':
lang.cpp:18:38: error: conversion from '_Rb_tree_const_iterator<long long int>' to non-scalar type '_Rb_tree_const_iterator<int>' requested
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ~~~~~~~~^~
lang.cpp:18:43: error: no match for 'operator!=' (operand types are 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} and 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'})
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ~~^~~~~~~~~~
| | |
| | _Rb_tree_const_iterator<long long int>
| _Rb_tree_const_iterator<int>
In file included from /usr/include/c++/10/iosfwd:40,
from /usr/include/c++/10/ios:38,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/postypes.h:227:5: note: candidate: 'template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)'
227 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/10/bits/postypes.h:227:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::fpos<_StateT>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:496:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
496 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:496:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::pair<_T1, _T2>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:372:5: note: candidate: 'template<class _Iterator> bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
372 | operator!=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:372:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::reverse_iterator<_Iterator>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:410:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
410 | operator!=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:410:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::reverse_iterator<_Iterator>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1444:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
1444 | operator!=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1444:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::move_iterator<_IteratorL>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1501:5: note: candidate: 'template<class _Iterator> bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
1501 | operator!=(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1501:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::move_iterator<_IteratorL>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/string:41,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/allocator.h:213:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const std::allocator<_CharT>&, const std::allocator<_T2>&)'
213 | operator!=(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/10/bits/allocator.h:213:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::allocator<_CharT>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6229:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
6229 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6229:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6242:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
6242 | operator!=(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6242:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: mismatched types 'const _CharT*' and 'std::_Rb_tree_const_iterator<int>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/basic_string.h:6254:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)'
6254 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6254:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/bits/ios_base.h:46,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/system_error:398:3: note: candidate: 'bool std::operator!=(const std::error_code&, const std::error_code&)'
398 | operator!=(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/10/system_error:398:32: note: no known conversion for argument 1 from 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'const std::error_code&'
398 | operator!=(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/10/system_error:404:3: note: candidate: 'bool std::operator!=(const std::error_code&, const std::error_condition&)'
404 | operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/10/system_error:404:32: note: no known conversion for argument 1 from 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'const std::error_code&'
404 | operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/10/system_error:410:3: note: candidate: 'bool std::operator!=(const std::error_condition&, const std::error_code&)'
410 | operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/10/system_error:410:37: note: no known conversion for argument 1 from 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'const std::error_condition&'
410 | operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/10/system_error:415:3: note: candidate: 'bool std::operator!=(const std::error_condition&, const std::error_condition&)'
415 | operator!=(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/10/system_error:415:37: note: no known conversion for argument 1 from 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'const std::error_condition&'
415 | operator!=(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/10/bits/locale_facets.h:48,
from /usr/include/c++/10/bits/basic_ios.h:37,
from /usr/include/c++/10/ios:44,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from lang.cpp:1:
/usr/include/c++/10/bits/streambuf_iterator.h:233:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator!=(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&)'
233 | operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/10/bits/streambuf_iterator.h:233:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/set:61,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_set.h:1030:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> bool std::operator!=(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&)'
1030 | operator!=(const set<_Key, _Compare, _Alloc>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_set.h:1030:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::set<_Key, _Compare, _Alloc>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/set:62,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_multiset.h:1016:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> bool std::operator!=(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&)'
1016 | operator!=(const multiset<_Key, _Compare, _Alloc>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_multiset.h:1016:5: note: template argument deduction/substitution failed:
lang.cpp:18:52: note: 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::multiset<_Key, _Compare, _Alloc>'
18 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ^
In file included from /usr/include/c++/10/set:60,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_tree.h:401:7: note: candidate: 'bool std::operator!=(const _Self&, const _Self&)'
401 | operator!=(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/10/bits/stl_tree.h:401:31: note: no known conversion for argument 1 from 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'const _Self&'
401 | operator!=(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_tree.h:401:7: note: candidate: 'bool std::operator!=(const _Self&, const _Self&)'
401 | operator!=(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/10/bits/stl_tree.h:401:49: note: no known conversion for argument 2 from 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'const _Self&'
401 | operator!=(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~~~~^~~
lang.cpp:27:37: error: conversion from '_Rb_tree_const_iterator<long long int>' to non-scalar type '_Rb_tree_const_iterator<int>' requested
27 | for(set <int>::iterator it=s1.begin();it!=s1.end();it++) {
| ~~~~~~~~^~
lang.cpp:27:42: error: no match for 'operator!=' (operand types are 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int>