Saleh127

CF 864B

Jul 27th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define fellow_junior ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. int main()
  7. {
  8. fellow_junior
  9.  
  10. ll c,d,e,i,j,k=0,l;
  11. string a;
  12. cin>>c>>a;
  13. set<char>xx;
  14. for(i=0;i<c;i++)
  15. {
  16. if(a[i]>='a' && a[i]<='z')
  17. {
  18. xx.insert(a[i]);
  19. l=xx.size();
  20. k=max(k,l);
  21. }
  22. else
  23. {
  24. xx.clear();
  25. }
  26. }
  27. cout<<k<<endl;
  28. return 0;
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment