ამოხსნების სტატუსი

ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.


გაგზავნის თარიღი: 14.06.2019 15:04:28

ამოცანა: მსგავსება და განსხვავება

მომხმარებელი: bullseye

ვერდიქტი: ამოუხსნელი

შეფასება: 0 ქულა







#include <bits/stdc++.h>

using namespace std;
set <char> t1;
set <char> t2;
string a;
string b;
char p;
int m=0,n=0,i,j,t=0,k=0;
int main()
 {
     cin>>a>>b;
    m=a.size();
    n=b.size();

for (i=0; i<=m; i++)
{
        p=a[i];
        t1.insert(p);
}
for (j=0; j<=n; j++)
        if (t2.find(b[i])!=end()) t++; else k++;
cout<<t<<" "<<k;
return 0;


}
PROB_cpp_UID361PID76_96bc2b/main.cpp: In function 'int main()':
PROB_cpp_UID361PID76_96bc2b/main.cpp:22:32: error: no matching function for call to 'end()'
         if (t2.find(b[i])!=end()) t++; else k++;
                                ^
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
                 from /usr/include/c++/6/string:51,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from PROB_cpp_UID361PID76_96bc2b/main.cpp:1:
/usr/include/c++/6/initializer_list:99:5: note: candidate: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~
/usr/include/c++/6/initializer_list:99:5: note:   template argument deduction/substitution failed:
PROB_cpp_UID361PID76_96bc2b/main.cpp:22:32: note:   candidate expects 1 argument, 0 provided
         if (t2.find(b[i])!=end()) t++; else k++;
                                ^
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from PROB_cpp_UID361PID76_96bc2b/main.cpp:1:
/usr/include/c++/6/bits/range_access.h:68:5: note: candidate: template<class _Container> decltype (__cont.end()) std::end(_Container&)
     end(_Container& __cont) -> decltype(__cont.end())
     ^~~
/usr/include/c++/6/bits/range_access.h:68:5: note:   template argument deduction/substitution failed:
PROB_cpp_UID361PID76_96bc2b/main.cpp:22:32: note:   candidate expects 1 argument, 0 provided
         if (t2.find(b[i])!=end()) t++; else k++;
                                ^
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from PROB_cpp_UID361PID76_96bc2b/main.cpp:1:
/usr/include/c++/6/bits/range_access.h:78:5: note: candidate: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^~~
/usr/include/c++/6/bits/range_access.h:78:5: note:   template argument deduction/substitution failed:
PROB_cpp_UID361PID76_96bc2b/main.cpp:22:32: note:   candidate expects 1 argument, 0 provided
         if (t2.find(b[i])!=end()) t++; else k++;
                                ^
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from PROB_cpp_UID361PID76_96bc2b/main.cpp:1:
/usr/include/c++/6/bits/range_access.h:97:5: note: candidate: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^~~
/usr/include/c++/6/bits/range_access.h:97:5: note:   template argument deduction/substitution failed:
PROB_cpp_UID361PID76_96bc2b/main.cpp:22:32: note:   candidate expects 1 argument, 0 provided
         if (t2.find(b[i])!=end()) t++; else k++;
                                ^
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:95:0,
                 from PROB_cpp_UID361PID76_96bc2b/main.cpp:1:
/usr/include/c++/6/valarray:1216:5: note: candidate: template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)
     end(valarray<_Tp>& __va)
     ^~~
/usr/include/c++/6/valarray:1216:5: note:   template argument deduction/substitution failed:
PROB_cpp_UID361PID76_96bc2b/main.cpp:22:32: note:   candidate expects 1 argument, 0 provided
         if (t2.find(b[i])!=end()) t++; else k++;
                                ^
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:95:0,
                 from PROB_cpp_UID361PID76_96bc2b/main.cpp:1:
/usr/include/c++/6/valarray:1226:5: note: candidate: template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)
     end(const valarray<_Tp>& __va)
     ^~~
/usr/include/c++/6/valarray:1226:5: note:   template argument deduction/substitution failed:
PROB_cpp_UID361PID76_96bc2b/main.cpp:22:32: note:   candidate expects 1 argument, 0 provided
         if (t2.find(b[i])!=end()) t++; else k++;
                                ^