-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA_Bit.cpp
More file actions
46 lines (40 loc) · 767 Bytes
/
A_Bit.cpp
File metadata and controls
46 lines (40 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
////https://codeforces.com/problemset/problem/282/A
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
const int N = 1e5 + 5;
void solve()
{
int n;
cin >> n;
vector<string> str(n);
int plus = 0;
int minus = 0;
for (int i = 0; i < n; i++)
{
string s;
cin >> s;
str[i] = s;
for (int j = 0; j < s.size(); j++)
{
if (s[j] == '+')
{
plus++;
}
else if (s[j] == '-')
{
minus++;
}
}
}
plus = plus / 2;
minus = minus / 2;
cout << plus - minus << endl;
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
solve();
}