This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, blocks = 0; cin >> N; string A, B; cin >> A >> B;
if(B[0] == '1') blocks++;
for(int i = 1; i < N; i++) {
if(B[i] == '1' && B[i - 1] == '0') blocks++;
}
cout << blocks;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |