Torneio de tênis

Problem Link

Solution by Mr.Olimpia100 pts

Code / Notes

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

int main(){
    int ans=0;
    for(int i=0; i<6; i++){
        char s;
        cin >> s;
        if(s=='V') ans++;
    }
    if(ans==0) cout << -1;
    else if(ans==1 or ans==2) cout << 3;
    else if(ans==3 or ans==4) cout << 2;
    else cout << 1;
    cout << endl;
}

Last updated 1 week ago


« Back to problem