6 solutions

  • 1
    @ 2026-4-9 21:10:28
    
    ```cpp
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	string a;
    	string b;
    	cin>>a>>b;
    	if(a.find(b)==18446744073709551615)
    	{
    		cout<<"-1";
    	}
    	else{
    		cout<<a.find(b);
    	}
    	return 0;
    }
    

    Information

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