Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main(){
- int n;
- cin >> n;
- map<char, int> m;
- m.insert({'+', 0});
- m.insert({'-', 0});
- while(n--){
- string s;
- cin >> s;
- if(s[1] == '+'){
- m['+']++;
- } else{
- m['-']++;
- }
- }
- cout << m.begin()->second-m.rbegin()->second;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement