Advertisement
gabrielcabezas

Untitled

Mar 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int N=1000005,crivo[1000005];
  4. int main()
  5. {
  6. string s1,s2;
  7. int a=0,c=0;
  8. double ans;
  9. cin >> s1;
  10. cin >> s2;
  11. for (int i=0;i<s1.size();i++)
  12. {
  13. if (s1[i]=='+')
  14. a++;
  15. else if (s1[i]=='-')
  16. a--;
  17. else if (s1[i]=='?')
  18. c++;
  19. }
  20. for (int i=0;i<s2.size();i++)
  21. {
  22. if (s2[i]=='+')
  23. a--;
  24. else if (s2[i]=='-')
  25. a++;
  26. else if (s2[i]=='?')
  27. c++;
  28. }
  29.  
  30.  
  31.  
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement