4 solutions

  • 0
    @ 5 days ago
    #include<bits/stdc++.h>
    using namespace std;
    string s1;
    string s2;
    int main(){
    	cin>>s1>>s2;
    	if(s1.find(s2)!=-1){
    		cout<<s1.find(s2);
    	}else{
    		cout<<"-1";
    	}
    	
    	
    	return 0;
    } 
    
    • 0
      @ 9 months ago
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	string s1,s2;
      	cin>>s1>>s2;
      	if(s1.find(s2)!=-1)
      	{
      		cout<<s1.find(s2);
      	}
      	else
      	{
      		cout<<-1;
      	}
      	return 0;
      }
      • -2
        @ 1 year ago

        #include<bits/stdc++.h> using namespace std; int main(){ string s1,s2; cin>>s1>>s2; if(s1.find(s2)!=-1) { cout<<s1.find(s2); } else { cout<<-1; } return 0; }

        • -2
          @ 1 year ago

          #include<bits/stdc++.h> using namespace std; int main(){ string s1,s2; cin>>s1>>s2; if(s1.find(s2)!=-1) { cout<<s1.find(s2); } else { cout<<-1; } return 0; }

          • 1

          Information

          ID
          93
          Time
          1000ms
          Memory
          256MiB
          Difficulty
          1
          Tags
          (None)
          # Submissions
          50
          Accepted
          34
          Uploaded By