Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- void lowlize(string & s){
- for (int i=0;i<s.size();i++){
- if ( isalpha(s[i])){
- s[i]=tolower(s[i]);
- }
- }
- }
- int main(){
- string s;
- cin>> s;
- string destination = "python";
- int start = 0 ;
- int countReplace = 0 ;
- for (int i=0;i<destination.size();i++){
- for (int j=start ;j<s.size();j++){
- if ( destination[i] == s[j]){
- start= j+1;
- destination[i]=' ';
- s[j]=' ';
- countReplace ++ ;
- break;
- }
- }
- }
- if (countReplace == destination.size() ){
- cout<<"YES";
- }
- else cout<<"NO";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment