fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string s;
  7. cin>>s;
  8. if (s[0]>'Z' && s[0]<'A'){
  9. cout<<"No";
  10. return 0;
  11. }
  12. else{
  13. int p=1;
  14. for (int i=1; i<s.size(); i++){
  15. if (s[i]<='z' && s[i]>='a'){
  16. p++;
  17. if (p==5){
  18. cout<<"No";
  19. return 0;
  20. }
  21. }
  22. if (s[i]<='Z' && s[i]>='A'){
  23. if (p<2){
  24. cout<<"No";
  25. return 0;
  26. }
  27. p=1;
  28. }
  29.  
  30. }
  31.  
  32. cout<<"Yes";
  33. return 0;
  34. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
IoIsTheBest
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:34:1: error: expected ‘}’ at end of input
 }
 ^
prog.cpp:5:12: note: to match this ‘{’
 int main() {
            ^
stdout
Standard output is empty