From b821b9ef7271e2dd222540b84cf10ee8a6648abd Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Wed, 28 Jun 2023 02:18:19 +0600 Subject: [PATCH] initial commit --- 525A Vitaliy and Pie/525A.cpp | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 525A Vitaliy and Pie/525A.cpp diff --git a/525A Vitaliy and Pie/525A.cpp b/525A Vitaliy and Pie/525A.cpp new file mode 100644 index 0000000..068c9d9 --- /dev/null +++ b/525A Vitaliy and Pie/525A.cpp @@ -0,0 +1,42 @@ +#include +using namespace std; +using ll = long long; + +void solve() +{ + int n; + cin>>n; + string s; + cin>>s; + unordered_mapm; + int ct=0; + for(int i=0; i='a' && s[i]<='z') + { + m[s[i]]++; + } + else + { + char c; + c=tolower(s[i]); + if(m[c]>0) + { + m[c]--; + } + else ct++; + } + } + cout<> TC; + //cin.ignore(); + while (TC--) solve(); +} \ No newline at end of file