FEgor04

Untitled

Sep 8th, 2019
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1.     for(int i = 0; i < sz - 1; i++) {
  2.         if(a[i] == '(' && a[i+1] == '(') {
  3.             int cnt2 = 0;
  4.             for(int j = sz; j > 1; j--) {
  5.                 if(a[j] == ')' && a[j-1] == ')') {
  6.                     cnt2++;
  7.                 }
  8.             }
  9.             cnt1 += cnt2;
  10.         }
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment