Advertisement
Ankit_132

A

Sep 23rd, 2023
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1.  
  2. #include <bits/stdc++.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     string s;
  9.     cin>>s;
  10.  
  11.     int f = 1;
  12.  
  13.     for(int i=1; i<s.size(); i++)
  14.         f &= (s[i] < s[i-1]);
  15.  
  16.     if(f)       cout<<"Yes\n";
  17.     else        cout<<"No\n";
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement