Jump to content

Rate the CTRL+V of the user above you!


Gapone

Recommended Posts

10/10 lego set

Hey look buddy, I'm an engineer. That means I solve problems, not problems like "What is beauty?" Because that would fall within the purview of your conundrums of philosophy. I solve practical problems, for instance: how am I going to stop some mean mother Hubbard from tearing me a structurally superfluous be-hind? The answer, use a gun, and if that don't work... Use more gun. Take for instance this heavy caliber tripod mounted lil' old number designed by me, built by me, and you best hope... Not pointed at you.

engineer gaming engineer gaming engineer gaming engineer gaming : engineer gaming

Link to comment
Share on other sites

10/10 frontier justice

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,cc=0,ex=0;
    cin>>a;
    string b;
    cin>>b;
    for(int i=0;i<a;i++){
        if(b=='V'){
            cc++;
            ex++;

        }else if(b=='T'){
            if(ex>=3) cc=cc+(ex-2);
            ex=0;
        }else{
            if(ex>=3) cc=cc+(ex-2);
            ex=0;
            cc--;
        }
    }
    if(ex>=3) cc=cc+(ex-2);
    cout<<cc;
    return 0;
}

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...