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

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


გაგზავნის თარიღი: 14.05.2019 20:51:49

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

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

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

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







#include <bits/stdc++.h>
using namespace std;
int a,b,c,d,e,f,g,h,j,i,k,k1,k2,p,ans;
string st,sb,sa,sd,si,sb;
int main (){
    cin>>st>>sb;
    cin>>sa>>sd;
    e=st+sb;
    d=sa+sd;
    k=e.size();
    f=d.size();
    sort (e.begin(),e.end());
    sort (d.begin(),d.end());
    for (i=k-1; i>=1; i--){
        if (e[i]==e[i-1]) e.erase(i,1);
    }
    for (j=f-1;j>=1; j--){
        if (d[j]==d[j-1]) d.erase(j,1);
    }
    k1=e.size();
    k2=d.size();
    i=0; j=0;
    for (i=0;i<k1; i++){
        for (j=0; j<k2; j++){
            if (e[i]==d[j]) h++;
            
        }
    }
    p=k1+k2;
    ans=p-(2*h);
    cout<<h<<" "<<ans;
}
PROB_cpp_UID76PID76_1f179f/main.cpp:4:23: error: redefinition of 'std::__cxx11::string sb'
 string st,sb,sa,sd,si,sb;
                       ^~
PROB_cpp_UID76PID76_1f179f/main.cpp:4:11: note: 'std::__cxx11::string sb' previously declared here
 string st,sb,sa,sd,si,sb;
           ^~
PROB_cpp_UID76PID76_1f179f/main.cpp: In function 'int main()':
PROB_cpp_UID76PID76_1f179f/main.cpp:8:10: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
     e=st+sb;
          ^~
PROB_cpp_UID76PID76_1f179f/main.cpp:9:10: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
     d=sa+sd;
          ^~
PROB_cpp_UID76PID76_1f179f/main.cpp:10:9: error: request for member 'size' in 'e', which is of non-class type 'int'
     k=e.size();
         ^~~~
PROB_cpp_UID76PID76_1f179f/main.cpp:11:9: error: request for member 'size' in 'd', which is of non-class type 'int'
     f=d.size();
         ^~~~
PROB_cpp_UID76PID76_1f179f/main.cpp:12:13: error: request for member 'begin' in 'e', which is of non-class type 'int'
     sort (e.begin(),e.end());
             ^~~~~
PROB_cpp_UID76PID76_1f179f/main.cpp:12:23: error: request for member 'end' in 'e', which is of non-class type 'int'
     sort (e.begin(),e.end());
                       ^~~
PROB_cpp_UID76PID76_1f179f/main.cpp:13:13: error: request for member 'begin' in 'd', which is of non-class type 'int'
     sort (d.begin(),d.end());
             ^~~~~
PROB_cpp_UID76PID76_1f179f/main.cpp:13:23: error: request for member 'end' in 'd', which is of non-class type 'int'
     sort (d.begin(),d.end());
                       ^~~
PROB_cpp_UID76PID76_1f179f/main.cpp:15:16: error: invalid types 'int[int]' for array subscript
         if (e[i]==e[i-1]) e.erase(i,1);
                ^
PROB_cpp_UID76PID76_1f179f/main.cpp:15:24: error: invalid types 'int[int]' for array subscript
         if (e[i]==e[i-1]) e.erase(i,1);
                        ^
PROB_cpp_UID76PID76_1f179f/main.cpp:15:29: error: request for member 'erase' in 'e', which is of non-class type 'int'
         if (e[i]==e[i-1]) e.erase(i,1);
                             ^~~~~
PROB_cpp_UID76PID76_1f179f/main.cpp:18:16: error: invalid types 'int[int]' for array subscript
         if (d[j]==d[j-1]) d.erase(j,1);
                ^
PROB_cpp_UID76PID76_1f179f/main.cpp:18:24: error: invalid types 'int[int]' for array subscript
         if (d[j]==d[j-1]) d.erase(j,1);
                        ^
PROB_cpp_UID76PID76_1f179f/main.cpp:18:29: error: request for member 'erase' in 'd', which is of non-class type 'int'
         if (d[j]==d[j-1]) d.erase(j,1);
                             ^~~~~
PROB_cpp_UID76PID76_1f179f/main.cpp:20:10: error: request for member 'size' in 'e', which is of non-class type 'int'
     k1=e.size();
          ^~~~
PROB_cpp_UID76PID76_1f179f/main.cpp:21:10: error: request for member 'size' in 'd', which is of non-class type 'int'
     k2=d.size();
          ^~~~
PROB_cpp_UID76PID76_1f179f/main.cpp:25:20: error: invalid types 'int[int]' for array subscript
             if (e[i]==d[j]) h++;
                    ^
PROB_cpp_UID76PID76_1f179f/main.cpp:25:26: error: invalid types 'int[int]' for array subscript
             if (e[i]==d[j]) h++;
                          ^