Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std ;
- #define sz(s) int(s.size())
- #define all(s) s.begin() , s.end()
- #define imin INT_MIN
- #define imax INT_MAX
- #define ll long long
- #define ull unsigned long long
- #define Time cerr << "Time Taken: " << (float)clock() / CLOCKS_PER_SEC << " Secs" << "\n";
- #define cin(v) for (auto& i : v) cin >> i ;
- #define pb(x) push_back(x)
- #define getline(s) getline(cin >> ws, s)
- #define Mod 1'000'000'007
- #define INF 2'000'000'000
- #define Num_of_Digits(n) ((int)log10(n)+1)
- void ABDEL3AL () {
- ios_base::sync_with_stdio(false); cin.tie(nullptr) , cout.tie(nullptr) ;
- #ifndef ONLINE_JUDGE
- freopen("input.txt" , "r" , stdin) , freopen("output.txt" , "w" , stdout) ;
- #endif
- Time
- }
- int main() {
- ABDEL3AL() ;
- int t ; cin >> t ;
- int n = 0 ;
- while (t--) {
- string s ; cin >> s ;
- if (s.find('++X') != string :: npos || s.find('X++') != string :: npos) n++ ;
- if (s.find('--X') != string :: npos || s.find('X--') != string :: npos) n-- ;
- }
- cout << n ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement