QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#508788#7656. EszettMinyou0713Compile Error//C++141004b2024-08-07 20:14:542024-08-07 20:14:56

Judging History

你现在查看的是最新测评结果

  • [2024-08-07 20:14:56]
  • 评测
  • [2024-08-07 20:14:54]
  • 提交

answer

#include<bits\stdc++.h>
using namespace std;

int main(){
   string s;
   cin>>s;
   int count = 0;
   for(int i=0;i<s.size();i++){
      s[i]=s[i]+('a'-'A');
      if(s[i]=='s'&&s[i-1]=='s'){
         count++;
      }
   }
   //cout<<count;
   count=count+1;
   if(count<2) {
      for(int i=0;i<s.size();i++){
         cout<<s[i];
      }
   }
   else {
      for(int i=0;i<s.size();i++){
         cout<<s[i];
      }
      cout<<endl;
      int m = count - 1;
      for(int i=0;i<m;i++){
         int u = 0;
         for(int j=0;j<s.size();j++){
            if(s[j]=='s'){
               u++;
               if(s[j-1]!='s'&&s[j+1]!='s'&&j+1<s.size()) u--;
               if(u==i+1){
                  cout<<"B";
                  j++;
               }
               else{
                  cout<<s[j];
               }
            }
            else {
               cout<<s[j];
            }
         }
         cout<<endl;
      }
   }
   return 0;
}

Details

answer.code:1:9: fatal error: bits\stdc++.h: No such file or directory
    1 | #include<bits\stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.