ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2100. Wedding Dinner

Simple Solution in C++
Posted by Sofiullah Iqbal Kiron 5 Mar 2020 16:59
$ Before going to the solution, make sure that you had tried enough, please.

$ Code:-

#include<bits/stdc++.h>
#define START int main(){
#define END system("PAUSE");return 0;}
using namespace std;

START

    int n, guest=2;
    cin >> n;
    guest += n;
    while(n--)
    {
        string s;
        cin >> s;
        for(int i=0; i<s.size(); i++)
        {
            if(s[i]=='+')
            {
                guest++;
            }
        }
    }
    if(guest != 13)
    {
        cout << 100*guest << endl;
    }
    else
    {
        cout << 100*(guest+1) << endl;
    }

END


///Thank You and Pray for me.

Edited by author 05.03.2020 17:01