1 solutions

  • 0
    @ 2025-12-15 11:58:22

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int s,c;
    string t="abcdabdklabcjlkdweuabcsdjabcdoiewqabcjlkabcuioabc56809abc111",t1="abc";
    int main()
    {
    
    	cin>>s>>c;
    	string stemp=t.substr(s,c-s+1);
    	int t=stemp.find(t1);
    	if(t>=0) cout<<t+s;
    	else cout<<-1;
    	return 0;
    }
    
    • 1

    Information

    ID
    1056
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By