Skip to content

Commit 662a36b

Browse files
committed
Added 1703B - ICPC Balloons.cpp
1 parent 8c5661a commit 662a36b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

1703B - ICPC Balloons.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// ॐ नमः शिवाय
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
#define ll long long
5+
6+
// Code Written By: Vikash Patel
7+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
8+
9+
int main()
10+
{
11+
int t;
12+
cin>>t;
13+
while(t--)
14+
{
15+
int n;
16+
cin>>n;
17+
string s;
18+
cin>>s;
19+
map<char,int> mp;
20+
for(int i=0;i<n;i++)
21+
{
22+
mp[s[i]]++;
23+
}
24+
int tBalloons = 0;
25+
for(auto i : mp)
26+
{
27+
tBalloons += i.second+1;
28+
}
29+
cout<<tBalloons<<endl;
30+
}
31+
return 0;
32+
}

0 commit comments

Comments
 (0)