Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int t;
- bool k=false;
- string q,w,re;
- scanf("%d",&t);
- while(t--){
- cin>>w;
- q+=w;
- if(t)q+=' ';
- }
- scanf("%d",&t);
- while(t--){
- cin>>w;
- if(w=="CapsLock"&&!k)k=true;
- else if(w=="CapsLock"&&k)k=false;
- else if(w=="Backspace"&&re.length())re.pop_back();
- else if(w=="Space")re+=" ";
- else if(islower(w[0])&&k)re+=toupper(w[0]);
- else if(islower(w[0])&&!k)re+=w;
- }
- if(q==re)printf("Correct\n");
- else printf("Incorrect\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement